Last active
December 14, 2015 10:39
-
-
Save tpolecat/5074116 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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