3 ms·
Right. Not saying that it'd be hard to support the original code, but more that it's just an extremely weird case to have. As in, I'd say that adding "foo = try
by dzaima 4y ago
Right. Not saying that it'd be hard to support the original code, but more that it's just an extremely weird case to have. As in, I'd say that adding "foo = try { bar(baz) } catch (SomeException ex) { SOME_DEFAULT }", even though that requires adding the ability for blocks to "return" a value, would be a more sensible change to aid the problem at hand.
Were the original to be allowed, it be the first case where adding a System.out.println(); statement into code {}s results in an error. (ok, second case, the first being adding it before a super()/this() in a constructor. But hey look what post we're on!)