File tree 2 files changed +11
-9
lines changed
compiler/src/dotty/tools/dotc/typer
sbt-test/pipelining/Yjava-tasty-paths/b
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -4214,14 +4214,16 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4214
4214
val tree1 =
4215
4215
if ((pt eq AnyTypeConstructorProto ) || tp.typeParamSymbols.isEmpty) tree
4216
4216
else {
4217
- val tp1 =
4218
- if (ctx.isJava)
4219
- // Cook raw type
4220
- AppliedType (tree.tpe, tp.typeParams.map(Function .const(TypeBounds .empty)))
4221
- else
4222
- // Eta-expand higher-kinded type
4223
- tree.tpe.EtaExpand (tp.typeParamSymbols)
4224
- tree.withType(tp1)
4217
+ if (ctx.isJava)
4218
+ // Cook raw type
4219
+ val typeArgs = tp.typeParams.map(Function .const(TypeBounds .empty))
4220
+ val tree1 = AppliedTypeTree (tree, typeArgs.map(TypeTree (_)))
4221
+ val tp1 = AppliedType (tree.tpe, typeArgs)
4222
+ tree1.withType(tp1)
4223
+ else
4224
+ // Eta-expand higher-kinded type
4225
+ val tp1 = tree.tpe.EtaExpand (tp.typeParamSymbols)
4226
+ tree.withType(tp1)
4225
4227
}
4226
4228
if (ctx.mode.is(Mode .Pattern ) || ctx.mode.is(Mode .QuotedPattern ) || tree1.tpe <:< pt) tree1
4227
4229
else err.typeMismatch(tree1, pt)
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ object B {
43
43
val cd_ii_Raw : RawTypes # C [? ]# D [? ] = cd_ii
44
44
45
45
RawTypes .mii_Raw_Raw(cd_ii_Raw)
46
- // RawTypes.mii_Raw_Raw2(cd_ii_Raw) // error: dotty still doesnt rewrite the tree of a raw type to a type with wildcards
46
+ RawTypes .mii_Raw_Raw2(cd_ii_Raw)
47
47
}
48
48
}
49
49
You can’t perform that action at this time.
0 commit comments