File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
compiler/src/dotty/tools/dotc/typer
sbt-test/pipelining/Yjava-tasty-paths/b Expand file tree Collapse file tree 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
42754275 val tree1 =
42764276 if ((pt eq AnyTypeConstructorProto ) || tp.typeParamSymbols.isEmpty) tree
42774277 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)
42864288 }
42874289 if (ctx.mode.is(Mode .Pattern ) || ctx.mode.isQuotedPattern || tree1.tpe <:< pt) tree1
42884290 else err.typeMismatch(tree1, pt)
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ object B {
4343 val cd_ii_Raw : RawTypes # C [? ]# D [? ] = cd_ii
4444
4545 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)
4747 }
4848 }
4949
You can’t perform that action at this time.
0 commit comments