'left' and 'right' cannot be used as var names
My rule kept failing after the first debug:
get-import-name : TypeName(x,y) -> (left,right) with debug(!1);left := "foo" ; debug(!2);right := "bar"
Impossible to figure out why, until I saw this:
stratego.jvm.helper: [java] [ Main | warning ] Nullary constructor left used without parentheses [java] [ Main | warning ] Nullary constructor right used without parentheses
I assume the ‘left’ and ‘right’ constructors are related to the SDF annotations for left- and right-associative.
As these are not part of the project’s constructors they shouldn’t be available, or at least the editor should give a warning when using these variable names.Submitted by Danny Groenewegen on 22 July 2010 at 18:16
left := "foo"seems to report a Nullary constructor warning for me. Which version are you using?
Windows 7 32bit
Windows, huh? Well, since you’re using a recent version it must be related to Stratego import handling. My guess is that when you place a
libstratego-sglrimport at the top of your file, it will give you the warning…
Indeed, adding the
libstratego-sglrimport triggers the warning.
Blocked by Spoofax/118.
This caused again some trouble on today’s lab. It’s confusing that the build on the console reports errors which the editor does not report.
Caused by Spoofax/557.
Log in to post comments