Created
January 5, 2012 16:13
-
-
Save gjoseph/1565938 to your computer and use it in GitHub Desktop.
Did i just find a bug in @canonical or am i thick ? #groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
import groovy.transform.Canonical | |
def weird = new CanonicalIsWeird(a: 'first letter', b: 'second letter') | |
println "a: ${weird.a}" | |
println "b: ${weird.b}" | |
assert weird.a == 'first letter' | |
assert weird.b == 'second letter' | |
@Canonical | |
class CanonicalIsWeird { | |
def a, b | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you raise a Jira please. The workaround is to give types to your properties, e.g. String in this case - for at least the first property.