Skip to content

Instantly share code, notes, and snippets.

@luksrn
Created April 29, 2016 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luksrn/7818bf0f704f0fc34c01585c714167d9 to your computer and use it in GitHub Desktop.
Save luksrn/7818bf0f704f0fc34c01585c714167d9 to your computer and use it in GitHub Desktop.
traitAB.groovy
trait A {
String exec() { 'A' }
}
trait B {
String exec() { 'B' }
}
class C implements A,B {}
def c = new C()
println c.exec()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment