Skip to content

Commit 8c1ebfb

Browse files
committed
Fix #2230: Add regression test.
1 parent 10a1300 commit 8c1ebfb

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

+2
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ class CompilationTests extends ParallelSummaryReport with ParallelTesting {
157157
compileFile("../tests/neg/tailcall/tailrec.scala", defaultOptions) +
158158
compileFile("../tests/neg/tailcall/tailrec-2.scala", defaultOptions) +
159159
compileFile("../tests/neg/tailcall/tailrec-3.scala", defaultOptions) +
160+
compileFile("../tests/neg/double-bindings/overloadsOnAbstractTypes.scala",
161+
defaultOptions.filter(_ != "-Yno-double-bindings")) +
160162
compileDir("../tests/neg/typedIdents", defaultOptions)
161163
}.checkExpectedErrors()
162164

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
class Test1 {
3+
type A
4+
type B <: A
5+
6+
def foo(): A = ???
7+
def foo(): A = ??? // error
8+
9+
def bar(): A = ???
10+
def bar(): B = ??? // error
11+
}
12+
13+
class Test2 {
14+
type A
15+
type B <: A
16+
17+
def foo(x: A) = ???
18+
def foo(x: A) = ??? // error
19+
20+
def bar(x: A) = ???
21+
def bar(x: B) = ??? // error
22+
}

0 commit comments

Comments
 (0)