ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

switch / case statement matching Class variables doesn't work #352

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following code fails with 'Cannot convert Class to Foo'. It works if I 
remove @Typed, and of-course, if I instead do 'if(cls == Foo)'

-----------------------------------
@Typed package test

class Foo{}; class Bar{}

println getAdditionalPropsInfo(Foo)

Map getAdditionalPropsInfo(Class cls) {
    switch(cls) {
        case Foo:
            return [bar: Bar]
    }
}

-----------------------------------

Original issue reported on code.google.com by roshanda...@gmail.com on 15 Mar 2011 at 7:40

GoogleCodeExporter commented 8 years ago
Just submitted a fix for this issue.

Original comment by roshanda...@gmail.com on 30 May 2011 at 6:19

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 30 May 2011 at 6:38