Defining a generic List

Ah ok, no worries.

It is just that it sounded like it didn’t work and so I wanted to know why to see how to fix it :slight_smile:

I am especially worried about this one EventHandler<? super T> handler those Java signatures tend to cause problems in Scala. For example, if you look into my Scastie, I couldn’t write that signature, the compiler refuses it. So I just hope the SAM will be able to produce an instance of the correct type.

Sorry, that I haven’t answered yet, but I got stuck somewhere else, but I still need this solution so I will post here what the outcome of your code was :slight_smile:

1 Like