groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject Re: looks like a compiler bug?
Date Sat, 25 Aug 2018 22:42:45 GMT
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 }
> }



Mime
View raw message