I have written a simple test for binary expression type errorchecking. This test should yield two errors, since both a and b are integers and the operator requires two boolean operators.

test boolean op with int [[

public int calc() {
	int a;
	int b;			
	return a && b; 
}

]] 2 errors

Two error messages are shown (see below), one on node a and one on node b (both are underlined in red), but still the testcase fails. When I change the number of expected errors to 1, the test succeeds. How can it be that two error messages give just one error?

Multiple messages:

  • Expression is of type int instead of type
    boolean
    • Expression is of type int instead of type
      boolean
Submitted on 28 December 2011 at 16:00

On 2 February 2012 at 16:32 Lennart Kats commented:

Duplicate of Spoofax/468 and Spoofax/469.


On 2 February 2012 at 16:32 Lennart Kats closed this issue.

On 2 February 2012 at 16:32 Lennart Kats tagged duplicate

Log in to post comments