diff --git a/compiler/src/dotty/tools/dotc/config/Printers.scala b/compiler/src/dotty/tools/dotc/config/Printers.scala index 22775fb1c4a8..8e13e50e59b7 100644 --- a/compiler/src/dotty/tools/dotc/config/Printers.scala +++ b/compiler/src/dotty/tools/dotc/config/Printers.scala @@ -33,7 +33,7 @@ object Printers { val interactiv = noPrinter val matchTypes = noPrinter val nullables = noPrinter - val overload = default + val overload = noPrinter val patmatch = noPrinter val pickling = noPrinter val quotePickling = noPrinter diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index 70854457738f..b9a4fe3ca298 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -411,10 +411,18 @@ trait Applications extends Compatibility { /** The function's type after widening and instantiating polytypes * with TypeParamRefs in constraint set */ - @threadUnsafe lazy val methType: Type = liftedFunType.widen match { - case funType: MethodType => funType - case funType: PolyType => instantiateWithTypeVars(funType) - case tp => tp //was: funType + @threadUnsafe lazy val methType: Type = { + def rec(t: Type): Type = { + t.widen match{ + case funType: MethodType => funType + case funType: PolyType => + //rec(constrained(funType).resultType) //TODO: Could replace rec(etc) by etc.methType ? + rec(instantiateWithTypeVars(funType)) + case tp => tp + } + } + + rec(liftedFunType) } @threadUnsafe lazy val liftedFunType: Type = @@ -692,11 +700,8 @@ trait Applications extends Compatibility { final def addArg(arg: TypedArg, formal: Type): Unit = ok = ok & argOK(arg, formal) def makeVarArg(n: Int, elemFormal: Type): Unit = {} def fail(msg: Message, arg: Arg): Unit = - //println(msg) - //println(arg) ok = false def fail(msg: Message): Unit = - //println(msg) ok = false def appPos: SrcPos = NoSourcePosition @threadUnsafe lazy val normalizedFun: Tree = ref(methRef)