Another case where the nullness inference doesn't work
Brought to you by:
bonniot
This probably isn't really a bug, as it would probably require far more subtlety to catch automatically than is really worth including, but I thought I'd report it more for general interest. The following fails because it can't tell that 'string' can't be null:
package test;
public void testMethod (?String string, boolean isNull) requires ( (string != null) || isNull)
{
if (!isNull)
{
toString(string);
}
}