Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-600
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Martin Bravenboer
Reporter: Martin Bravenboer
Votes: 0
Watchers: 0
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Stratego/XT

Poor error report for 'build default' in normal pattern

Created: 2006-07-12 13:07   Updated: 2008-03-31 20:41
Component/s: strc - Stratego compiler
Affects Version/s: 0.16 (Stratego Core Compiler)
Fix Version/s: 0.17

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
This could be a common mistake:
------------------------------
module foo
strategies

  main =
    ?_(xs)
    ; !xs
------------------------------

and the error report is very unclear:
------------------------------
martin@logistico:~> strc -i foo.str
[ strc | info ] Compiling 'foo.str'
error: cannot type BuildDefault(Var(""))
    inferred types of subterms:
    typed Var("") as Term, PreTerm, Var
[ strc | info ] abstract syntax in 'foo.sci.fe-cong.Stratego-Core'
[ strc | info ] concrete syntax in 'foo.sci.fe-cong.Stratego-Core.txt'
[ strc | critical ] file /tmp/StrategoXTO0fNCidoes not satisfy format Stratego-Core
This indicates a bug in the compiler
Please notify stratego-bugs@cs.uu.nl
           FILE("/tmp/StrategoXTO0fNCi"
------------------------------

This could be solved by separating the syntax of overlays patterns from normal patterns (grammar mixins). Also, the compiler could of course check that a pattern does not use features that are illegal in this context. The _ in a build is another example of this.

Reported by Eric Tanter.

 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.