melix/groovy-core — pull request #1 by glaforge (2013-06-23 20:50:36+00:00)
Title: Adding a trait keyword

Experiment at introducing a `trait` keyword.

Beware there's still a problem with the tests involving the usage of precompiled traits, but I haven't figured out why.
It's complaining about the presence of the `__$stMC` field.
If I temporarily remove that check from the `Verifier` on line 191, I then get another problem afterwards with the following message:
java.lang.IncompatibleClassChangeError: Found interface org.codehaus.groovy.transform.TestTrait2, but class was expected

Also we'll need to refactor the `traitDefinition` production in `groovy.g` as it's currently a mere copy of `classDefinition`. So duplication should be avoided.