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 1 December 2011 at 17:23

On 9 December 2011 at 11:02 Guido Wachsmuth closed this issue.

On 9 December 2011 at 11:02 Guido Wachsmuth commented:

Duplicate of #468


On 9 December 2011 at 11:10 Lennart Kats tagged duplicate

Log in to post comments