Wouldn't it be easier/better to require stuff like that (which will be a programming error in 99.999...% of cases) require an e.g. @LenientMode annotation to not raise a compilation error (wherever that error is located) ?

class Foo {
  @LenientMod
  void baz() { return 42 } // compiles & runs
}


class Foo {
  void baz() { return 42 } // compile error
}



On 25.08.2018 05:15, Paul King wrote:
Of course there is an argument (like you mentioned) that we should go the other way and not report the error which would allow scenarios like this:

class Foo {
  void baz() { return 42 }
}


Reply via email to