We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc36836 commit 7681545Copy full SHA for 7681545
_overviews/scala-book/classes-aux-constructors.md
@@ -28,17 +28,17 @@ val DefaultCrustType = "THIN"
28
class Pizza (var crustSize: Int, var crustType: String) {
29
30
// one-arg auxiliary constructor
31
- def this(crustSize: Int) {
+ def this(crustSize: Int) = {
32
this(crustSize, DefaultCrustType)
33
}
34
35
36
- def this(crustType: String) {
+ def this(crustType: String) = {
37
this(DefaultCrustSize, crustType)
38
39
40
// zero-arg auxiliary constructor
41
- def this() {
+ def this() = {
42
this(DefaultCrustSize, DefaultCrustType)
43
44
0 commit comments