Skip to content

Instantly share code, notes, and snippets.

@tpolecat
Last active December 14, 2015 10:39
Show Gist options
  • Save tpolecat/5074116 to your computer and use it in GitHub Desktop.
Save tpolecat/5074116 to your computer and use it in GitHub Desktop.
public class MyJavaClass {
protected int bar = 1;
}
trait MyScalaTrait extends MyJavaClass {
def foo = {
bar = bar + 1
bar
}
}
object MyScalaTraitTest extends MyScalaTrait with App {
println(foo) // 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment