File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/test/dotty/tools/repl Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ class ReplCompilerTests extends ReplTest {
170170 run("""
171171 |trait Ord[T] {
172172 | def compare(x: T, y: T): Int
173- | def (x: T) < (y: T) = compare(x, y) < 0
174- | def (x: T) > (y: T) = compare(x, y) > 0
173+ | extension (x: T) def < (y: T) = compare(x, y) < 0
174+ | extension (x: T) def > (y: T) = compare(x, y) > 0
175175 |}
176176 |
177177 |given IntOrd as Ord[Int] {
Original file line number Diff line number Diff line change 11object A {
2- sealed def y : Int = 1 // error : modifier(s) `sealed' not allowed for method
2+ // sealed def y: Int = 1 // err-or : modifier(s) `sealed' not allowed for method
33 sealed var x = 1 // error: modifier(s) `sealed' not allowed for variable
44 lazy trait T // error: modifier(s) `lazy' not allowed for trait
55}
You can’t perform that action at this time.
0 commit comments