| <<O>> Difference Topic BadErrorMessages (r1.11 - 01 Feb 2004 - BrianSmith) |
| Added: | |
| > > |
Desugaring of ?: operatorIn general, it seems like desugared code should never be shown in error messages. Only show code fragments when necessary, and only show code that actually appears in the source files. Code:
class A { ?Integer n; }
void main(String [] args) {
let a2 = new A(n: new Integer(2));
Integer n2 = a2.n != null ? a2.n : new Integer(1);
}
Old message:
The value if(`!=`(a2.n(), null))
a2.n()
else
new Integer(1)
cannot be assigned to n2 because it might be null.
New message:
The value a2.n != null ? a2.n : new Integer(1)
cannot be assigned to n2 because it might be null.
or
Attempt to assign a possibly-null value to n2
|
| Topic BadErrorMessages . { View | Diffs | r1.12 | > | r1.11 | > | r1.10 | More } |
|
Revision r1.10 - 06 May 2003 - 09:26 GMT - ArjanB Revision r1.11 - 01 Feb 2004 - 06:05 GMT - BrianSmith |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |