File tree 2 files changed +24
-0
lines changed
compiler/test/dotty/tools/dotc
tests/neg/double-bindings
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,8 @@ class CompilationTests extends ParallelSummaryReport with ParallelTesting {
157
157
compileFile(" ../tests/neg/tailcall/tailrec.scala" , defaultOptions) +
158
158
compileFile(" ../tests/neg/tailcall/tailrec-2.scala" , defaultOptions) +
159
159
compileFile(" ../tests/neg/tailcall/tailrec-3.scala" , defaultOptions) +
160
+ compileFile(" ../tests/neg/double-bindings/overloadsOnAbstractTypes.scala" ,
161
+ defaultOptions.filter(_ != " -Yno-double-bindings" )) +
160
162
compileDir(" ../tests/neg/typedIdents" , defaultOptions)
161
163
}.checkExpectedErrors()
162
164
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments