Created
May 20, 2010 20:40
-
-
Save RobertFischer/408066 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
// This works | |
class Foo(bar:Int) { | |
def this(bar1:Int, bar2:Int) = this(bar1 + bar2) | |
} |
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
// This works | |
class Foo(bar:Int) { | |
def this(bar1:Int, bar2:Int) = { | |
this(bar1 + bar2) | |
} | |
} |
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
// This doesn't | |
class Foo(bar:Int) { | |
def this(bar1:Int, bar2:Int) = { | |
val summer = new Summer(bar1, bar2) | |
this(summer.sum()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment