File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1166,7 +1166,8 @@ object Types {
1166
1166
else if (tp.symbol.isAliasType) tp.underlying.underlyingClassRef(refinementOK)
1167
1167
else NoType
1168
1168
case tp : AppliedType =>
1169
- tp.superType.underlyingClassRef(refinementOK)
1169
+ if (tp.tycon.isLambdaSub) NoType
1170
+ else tp.superType.underlyingClassRef(refinementOK)
1170
1171
case tp : AnnotatedType =>
1171
1172
tp.underlying.underlyingClassRef(refinementOK)
1172
1173
case tp : RefinedType =>
Original file line number Diff line number Diff line change
1
+ class Test [T ] {
2
+ type U <: T
3
+
4
+ type Foo [T ] = Array [T ]
5
+
6
+ new T // error: not a class type
7
+ new T () // error: not a class type
8
+ new U // error: not a class type
9
+ new U () // error: not a class type
10
+ new IArray [String ] // error: not a class type
11
+ new IArray [String ]() // error: not a class type
12
+ new IArray [String ](10 ) // error: not a class type // error: too mamy arguments
13
+
14
+ new Foo [String ](10 ) // ok
15
+ }
Original file line number Diff line number Diff line change 1
1
class x0 [x1[]] // error
2
- extends x1[ // error
2
+ extends x1[
3
3
// error
You can’t perform that action at this time.
0 commit comments