We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7329957 commit 6fac433Copy full SHA for 6fac433
src/dotty/tools/dotc/typer/Typer.scala
@@ -1670,11 +1670,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1670
1671
def adaptType(tp: Type): Tree = {
1672
val tree1 =
1673
- if (pt != AnyTypeConstructorProto && tp.typeParamSymbols.nonEmpty) {
1674
- println(i"lam abs $tp with tparams ${tp.typeParamSymbols}%, %")
1675
- tree.withType(tree.tpe.EtaExpand(tp.typeParamSymbols))
1676
- }
1677
- else tree
+ if ((pt eq AnyTypeConstructorProto) || tp.typeParamSymbols.isEmpty) tree
+ else tree.withType(tree.tpe.EtaExpand(tp.typeParamSymbols))
1678
if ((ctx.mode is Mode.Pattern) || tree1.tpe <:< pt) tree1
1679
else err.typeMismatch(tree1, pt)
1680
}
0 commit comments