groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Champeau <cedric.champ...@gmail.com>
Subject Re: return type and generics
Date Tue, 22 Sep 2015 16:03:23 GMT
Yes, there's a way: please file a bug report :) It should have been caught.
I'm actually very surprised it doesn't :)

2015-09-22 18:00 GMT+02:00 Jamie Echlin <jamie.echlin@gmail.com>:

> This compiles OK:
>
> @TypeChecked
> class C extends Script {
>
>     @Override
>     List<String> run() {
>         [11, 12]
>     }
> }
>
> however, in IDEA, with @TypeChecked, it's highlighted as an error. I
> didn't really expect this to produce an error in static type checking, but
> I'm just wondering if IDEA is going more here than @TypeChecked does.
>
> Or is there some way to get type checking to flag this as an error?
> cheers, jamie
>

Mime
View raw message