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

TC does not introduce abstract constructor for syntax rules #450

Closed
PaulKlint opened this issue Dec 20, 2013 · 1 comment
Closed

TC does not introduce abstract constructor for syntax rules #450

PaulKlint opened this issue Dec 20, 2013 · 1 comment

Comments

@PaulKlint
Copy link
Member

It seems that the type checker does not introduce abstract constructors for syntax rules with a constructor name.

import Exception;
import List;
import ParseTree;

syntax A = a: "a";

syntax As = as: A+ alist;

syntax C = c: A a "x" As as;

test bool tstA(){
    pt = [A] "a";
    return a() := pt ;
}

gives

error("Constructor name is not in scope",|rascal:///experiments/Compiler/Examples/Tst.rsc|(417,1,<23,11>,<23,12>))
error("Type of pattern could not be computed",|rascal:///experiments/Compiler/Examples/Tst.rsc|(417,3,<23,11>,<23,14>))
|rascal://experiments::Compiler::Rascal2muRascal::RascalModule|(2652,25,<80,12>,<80,37>): "Module contains errors!"
@mahills
Copy link
Member

mahills commented Dec 22, 2013

This now checks fine.

@mahills mahills closed this as completed Dec 22, 2013
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