Skip to content

Commit 4b5a351

Browse files
Merge pull request #12952 from griggt/fix-i9460
Fix #9460: Add regression test
2 parents ada5ac7 + 0e533b0 commit 4b5a351

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/neg/i9460.check

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Error: tests/neg/i9460.scala:3:6 ------------------------------------------------------------------------------------
2+
3 |class C extends B // error
3+
| ^
4+
| parameterized trait A is indirectly implemented,
5+
| needs to be implemented directly so that arguments can be passed

tests/neg/i9460.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
trait A(val s: String) { println(s) }
2+
trait B extends A { override val s = "B" } // requires override val s
3+
class C extends B // error
4+
@main def Test = C()

0 commit comments

Comments
 (0)