Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling Grammar.rsc gives a compiler error. #455

Closed
PaulKlint opened this issue Dec 22, 2013 · 2 comments
Closed

Compiling Grammar.rsc gives a compiler error. #455

PaulKlint opened this issue Dec 22, 2013 · 2 comments
Assignees

Comments

@PaulKlint
Copy link
Member

Compiling Grammar.rsc gives a compiler error:

rascal>compile(|rascal:///Grammar.rsc|, recompile=true);
...
r2mu: Compiling grammar
r2mu: Compiling compose
Rebuilding visit!
|rascal://lang::rascal::types::AbstractType|(21233,2,<435,70>,<435,72>): "tupleHasFieldNames given non-Tuple type Production"
    at tupleHasFieldNames(|rascal://experiments::Compiler::Rascal2muRascal::RascalExpression|(21600,2,<501,26>,<501,28>))
@ghost ghost assigned Anastassija Dec 22, 2013
@Anastassija
Copy link
Contributor

This is a problem of handling the field-update expressions by the compiler, the following example also crashes:

data A = a(str field);

value main(list[value] args) { 
    return a("1")[field = "2"];
}
...
r2mu: Compiling main
adt("A",[])
|rascal://lang::rascal::types::AbstractType|(21233,2,<435,70>,<435,72>): "tupleHasFieldNames given non-Tuple type A"
    at tupleHasFieldNames(|rascal://experiments::Compiler::Rascal2muRascal::RascalExpression|(21669,2,<503,26>,<503,28>))

@PaulKlint
Copy link
Member Author

@Anastassija thanks for your analysis. It just happens that I solved this problem in commit caf33da and Grammar.rsc now compiles ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants