Skip to content

Commit 42adb61

Browse files
committed
Add inheritance test
1 parent 4d9c0c5 commit 42adb61

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/neg/3559d.check

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- [E006] Unbound Identifier Error: tests/neg/3559d.scala:7:9 ----------------------------------------------------------
2+
7 | this(f) // error
3+
| ^
4+
| Not found: f
5+
6+
longer explanation available when compiling with `-explain`

tests/neg/3559d.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class B {
2+
def f: String = "hello"
3+
}
4+
5+
class A(a: Any) extends B {
6+
def this() = {
7+
this(f) // error
8+
}
9+
}

0 commit comments

Comments
 (0)