File tree 2 files changed +23
-0
lines changed
compiler/test/dotty/tools/dotc
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ class CompilationTests extends ParallelTesting {
156
156
compileFile(" ../tests/neg/customArgs/nopredef.scala" , defaultOptions.and(" -Yno-predef" )) +
157
157
compileFile(" ../tests/neg/customArgs/noimports.scala" , defaultOptions.and(" -Yno-imports" )) +
158
158
compileFile(" ../tests/neg/customArgs/noimports2.scala" , defaultOptions.and(" -Yno-imports" )) +
159
+ compileFile(" ../tests/neg/customArgs/overloadsOnAbstractTypes.scala" , allowDoubleBindings) +
159
160
compileFile(" ../tests/neg/tailcall/t1672b.scala" , defaultOptions) +
160
161
compileFile(" ../tests/neg/tailcall/t3275.scala" , defaultOptions) +
161
162
compileFile(" ../tests/neg/tailcall/t6574.scala" , defaultOptions) +
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