File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
class C1 {
2
2
type T
3
- def this (x : T ) { this () }
3
+ def this (x : T ) = { this () }
4
4
}
5
5
6
6
class C1a [T ] {
7
- def this (x : T ) { this () } // works, no error here
7
+ def this (x : T ) = { this () } // works, no error here
8
8
}
9
9
10
10
class C2 (x : Int ) {
11
- def this (a : Int , b : Int = x) {
11
+ def this (a : Int , b : Int = x) = {
12
12
this (b)
13
13
}
14
14
}
15
15
16
16
class C3 {
17
17
val x = 0
18
- def this (a : Int = x) { this () }
18
+ def this (a : Int = x) = { this () }
19
19
}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ object F {
5
5
}
6
6
7
7
class COkay extends C (0 ) {
8
- def this (a : Any ) {
8
+ def this (a : Any ) = {
9
9
this ()
10
10
def x = " " .toString
11
11
F .byname(x)
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ abstract class Foo {
3
3
def baz
4
4
def boo (i : Int , l : Long )
5
5
def boz (i : Int , l : Long ): Unit = {}
6
- def this (i : Int ) { this () } // Don't complain here!
6
+ def this (i : Int ) = { this () } // Don't complain here!
7
7
def foz : Unit // Don't complain here!
8
8
}
You can’t perform that action at this time.
0 commit comments