Skip to content

Instantly share code, notes, and snippets.

@matthandlersux
Created June 29, 2012 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthandlersux/3021478 to your computer and use it in GitHub Desktop.
Save matthandlersux/3021478 to your computer and use it in GitHub Desktop.
scala question about traits and parameter access
object Test {
var list = List()
}
abstract class Test(parameter:String) {
}
trait TestTrait {
var parameter:String
Test.list = Test.list ++ List(parameter)
}
class SubTest extends Test("name") with TestTrait {
}
Test.list == List("name")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment