Hello Groovy users,

Both of the following totally refuses to compile and I mega fail in 
comprehending why!!!

    private Map<SGID, Closure<SGMessage >> = new LinkedHashMap<SGID, 
Closure<SGMessage >> ()
    private Map<SGID, Closure<SGMessage >> = [:]

Is it forbidden to put a Closure in a Map ? The Closure is a callback. 

I've used Closures before without problems. I totally fail to se the problem 
here. 

I prefer the second variant with [:] to define a Map.

I'm using Groovy 5.0.0

What am I  doing wrong here ???? 

Best Regards,

Tommy Svensson

[email protected]

Reply via email to