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:

    [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

On 22 July 2010 at 20:31 Lennart Kats commented:

left := "foo" seems to report a Nullary constructor warning for me. Which version are you using?

On 22 July 2010 at 20:40 Danny Groenewegen commented:

Eclipse 3.5
Windows 7 32bit

On 22 July 2010 at 21:15 Lennart Kats commented:

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-sglr import at the top of your file, it will give you the warning…

On 22 July 2010 at 21:21 Danny Groenewegen commented:

Indeed, adding the libstratego-sglr import triggers the warning.

On 21 November 2010 at 13:26 Lennart Kats commented:

Blocked by Spoofax/118.

On 22 December 2011 at 21:56 Guido Wachsmuth commented:

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.

On 8 January 2013 at 15:14 Eelco Visser tagged major

On 8 January 2013 at 15:14 Eelco Visser removed tag minor

On 10 March 2013 at 10:16 Guido Wachsmuth commented:

Caused by Spoofax/557.

On 10 March 2013 at 10:16 Guido Wachsmuth closed this issue.

Log in to post comments