Skip to content

Commit 3dc1cd7

Browse files
committed
Add more tests
1 parent 0731c24 commit 3dc1cd7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/init/neg/i15764b.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class B(val y: Int):
2+
// println(y)
3+
// foo()
4+
def foo() = println(y)
5+
6+
class C(x: Int) extends B(x):
7+
override val y: Int = x // error: override param with non-param

tests/init/neg/i15764c.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class A(val y: Int)
2+
3+
class B(override val y: Int) extends A(y)
4+
5+
class C(override val y: Int) extends B(7) // error

0 commit comments

Comments
 (0)