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 @@ -4275,14 +4275,16 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4275
4275
val tree1 =
4276
4276
if ((pt eq AnyTypeConstructorProto ) || tp.typeParamSymbols.isEmpty) tree
4277
4277
else {
4278
- val tp1 =
4279
- if (ctx.isJava)
4280
- // Cook raw type
4281
- AppliedType (tree.tpe, tp.typeParams.map(Function .const(TypeBounds .empty)))
4282
- else
4283
- // Eta-expand higher-kinded type
4284
- tree.tpe.etaExpand(tp.typeParamSymbols)
4285
- tree.withType(tp1)
4278
+ if (ctx.isJava)
4279
+ // Cook raw type
4280
+ val typeArgs = tp.typeParams.map(Function .const(TypeBounds .empty))
4281
+ val tree1 = AppliedTypeTree (tree, typeArgs.map(TypeTree (_)))
4282
+ val tp1 = AppliedType (tree.tpe, typeArgs)
4283
+ tree1.withType(tp1)
4284
+ else
4285
+ // Eta-expand higher-kinded type
4286
+ val tp1 = tree.tpe.etaExpand(tp.typeParamSymbols)
4287
+ tree.withType(tp1)
4286
4288
}
4287
4289
if (ctx.mode.is(Mode .Pattern ) || ctx.mode.isQuotedPattern || tree1.tpe <:< pt) tree1
4288
4290
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