From 77a04b26d7c24ed56b4be45cfb41fa8b2e75a461 Mon Sep 17 00:00:00 2001 From: Samuel Gruetter Date: Wed, 26 Mar 2014 20:53:17 +0100 Subject: replace i"..." by d"..." if string might go into a Diagnostic and might be nonsensical Conflicts: src/dotty/tools/dotc/typer/Checking.scala src/dotty/tools/dotc/typer/TypeAssigner.scala --- src/dotty/tools/dotc/transform/TreeChecker.scala | 1 + src/dotty/tools/dotc/typer/Applications.scala | 6 ++--- src/dotty/tools/dotc/typer/Checking.scala | 24 ++++++++--------- src/dotty/tools/dotc/typer/ErrorReporting.scala | 18 ++++++------- src/dotty/tools/dotc/typer/Implicits.scala | 14 +++++----- src/dotty/tools/dotc/typer/Inferencing.scala | 4 +-- src/dotty/tools/dotc/typer/Namer.scala | 2 +- src/dotty/tools/dotc/typer/TypeAssigner.scala | 14 +++++----- src/dotty/tools/dotc/typer/Typer.scala | 34 ++++++++++++------------ 9 files changed, 59 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/transform/TreeChecker.scala b/src/dotty/tools/dotc/transform/TreeChecker.scala index ea3afc679..5913875b8 100644 --- a/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -10,6 +10,7 @@ import core.Symbols._ import core.Types._ import core.Constants._ import core.StdNames._ +import core.Decorators._ import core.transform.Erasure.isUnboundedGeneric import typer.ErrorReporting._ import ast.Trees._ diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 9a21e1c54..f1feb5361 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -647,7 +647,7 @@ trait Applications extends Compatibility { self: Typer => maximizeType(unapplyArgType) match { case Some(tvar) => def msg = - i"""There is no best instantiation of pattern type $unapplyArgType + d"""There is no best instantiation of pattern type $unapplyArgType |that makes it a subtype of selector type $pt. |Non-variant type variable ${tvar.origin} cannot be uniquely instantiated.""".stripMargin if (fromScala2x) { @@ -671,7 +671,7 @@ trait Applications extends Compatibility { self: Typer => unapp.println("Neither sub nor super") unapp.println(TypeComparer.explained(implicit ctx => unapplyArgType <:< wpt)) errorType( - i"Pattern type $unapplyArgType is neither a subtype nor a supertype of selector type $wpt", + d"Pattern type $unapplyArgType is neither a subtype nor a supertype of selector type $wpt", tree.pos) } @@ -692,7 +692,7 @@ trait Applications extends Compatibility { self: Typer => case _ => args } if (argTypes.length != bunchedArgs.length) { - ctx.error(i"wrong number of argument patterns for $qual; expected: ($argTypes%, %)", tree.pos) + ctx.error(d"wrong number of argument patterns for $qual; expected: ($argTypes%, %)", tree.pos) argTypes = argTypes.take(args.length) ++ List.fill(argTypes.length - args.length)(WildcardType) } diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala index dcb0781c6..287e93c7a 100644 --- a/src/dotty/tools/dotc/typer/Checking.scala +++ b/src/dotty/tools/dotc/typer/Checking.scala @@ -14,7 +14,7 @@ import util.{Stats, SimpleMap} import util.common._ import Decorators._ import Uniques._ -import ErrorReporting.errorType +import ErrorReporting.{errorType, DiagnosticString} import config.Printers._ import collection.mutable @@ -27,7 +27,7 @@ trait Checking { def checkValue(tree: Tree, proto: Type)(implicit ctx: Context): tree.type = { if (!proto.isInstanceOf[SelectionProto]) { val sym = tree.tpe.termSymbol - if ((sym is Package) || (sym is JavaModule)) ctx.error(i"$sym is not a value", tree.pos) + if ((sym is Package) || (sym is JavaModule)) ctx.error(d"$sym is not a value", tree.pos) } tree } @@ -38,7 +38,7 @@ trait Checking { def substituted(tp: Type) = tp.substParams(poly, argTypes) for ((arg, bounds) <- args zip poly.paramBounds) { def notConforms(which: String, bound: Type) = - ctx.error(i"Type argument ${arg.tpe} does not conform to $which bound $bound", arg.pos) + ctx.error(d"Type argument ${arg.tpe} does not conform to $which bound $bound", arg.pos) if (!(arg.tpe <:< substituted(bounds.hi))) notConforms("upper", bounds.hi) if (!(bounds.lo <:< arg.tpe)) notConforms("lower", bounds.lo) } @@ -46,13 +46,13 @@ trait Checking { /** Check that type `tp` is stable. */ def checkStable(tp: Type, pos: Position)(implicit ctx: Context): Unit = - if (!tp.isStable) ctx.error(i"$tp is not stable", pos) + if (!tp.isStable) ctx.error(d"$tp is not stable", pos) /** Check that type `tp` is a legal prefix for '#'. * @return The type itself */ def checkLegalPrefix(tp: Type, pos: Position)(implicit ctx: Context): Unit = - if (!tp.isLegalPrefix) ctx.error(i"$tp is not a valid prefix for '#'", pos) + if (!tp.isLegalPrefix) ctx.error(d"$tp is not a valid prefix for '#'", pos) /** Check that `tp` is a class type with a stable prefix. Also, if `isFirst` is * false check that `tp` is a trait. @@ -62,10 +62,10 @@ trait Checking { tp.underlyingClassRef match { case tref: TypeRef => checkStable(tref.prefix, pos) - if (traitReq && !(tref.symbol is Trait)) ctx.error(i"$tref is not a trait", pos) + if (traitReq && !(tref.symbol is Trait)) ctx.error(d"$tref is not a trait", pos) tp case _ => - ctx.error(i"$tp is not a class type", pos) + ctx.error(d"$tp is not a class type", pos) defn.ObjectClass.typeRef } @@ -74,7 +74,7 @@ trait Checking { case tpt: untpd.DerivedTypeTree => case TypeTree(untpd.EmptyTree) => val resStr = if (defTree.isInstanceOf[untpd.DefDef]) "result " else "" - ctx.error(i"${resStr}type of implicit definition needs to be given explicitly", defTree.pos) + ctx.error(d"${resStr}type of implicit definition needs to be given explicitly", defTree.pos) case _ => } @@ -96,7 +96,7 @@ trait Checking { case tp: RefinedType => tp.derivedRefinedType(tp.parent, tp.refinedName, checkFeasible(tp.refinedInfo, pos, where)) case tp @ TypeBounds(lo, hi) if !(lo <:< hi) => - ctx.error(i"no type exists between low bound $lo and high bound $hi$where", pos) + ctx.error(d"no type exists between low bound $lo and high bound $hi$where", pos) tp.derivedTypeAlias(hi) case _ => tp @@ -113,17 +113,17 @@ trait Checking { typr.println(i"conflict? $decl $other") if (decl.signature matches other.signature) { def doubleDefError(decl: Symbol, other: Symbol): Unit = { - def ofType = if (decl.isType) "" else i": ${other.info}" + def ofType = if (decl.isType) "" else d": ${other.info}" def explanation = if (!decl.isSourceMethod) "" else "\n (both definitions have the same erased type signature)" - ctx.error(i"$decl is already defined as $other$ofType$explanation", decl.pos) + ctx.error(d"$decl is already defined as $other$ofType$explanation", decl.pos) } if (decl is Synthetic) doubleDefError(other, decl) else doubleDefError(decl, other) } if ((decl is HasDefaultParams) && (other is HasDefaultParams)) { - ctx.error(i"two or more overloaded variants of $decl have default arguments") + ctx.error(d"two or more overloaded variants of $decl have default arguments") decl resetFlag HasDefaultParams } } diff --git a/src/dotty/tools/dotc/typer/ErrorReporting.scala b/src/dotty/tools/dotc/typer/ErrorReporting.scala index 8d69239f2..119778139 100644 --- a/src/dotty/tools/dotc/typer/ErrorReporting.scala +++ b/src/dotty/tools/dotc/typer/ErrorReporting.scala @@ -32,7 +32,7 @@ object ErrorReporting { val treeSym = ctx.symOfContextTree(tree) if (treeSym.exists && treeSym.name == cycleSym.name && treeSym.owner == cycleSym.owner) { val result = if (cycleSym.isSourceMethod) " result" else "" - i"overloaded or recursive $cycleSym needs$result type" + d"overloaded or recursive $cycleSym needs$result type" } else errorMsg(msg, cx.outer) case _ => @@ -48,11 +48,11 @@ object ErrorReporting { case tp: FunProto => val result = tp.resultType match { case tp: WildcardType => "" - case tp => i"and expected result type $tp" + case tp => d"and expected result type $tp" } - i"arguments (${tp.typedArgs.tpes}%, %)$result" + d"arguments (${tp.typedArgs.tpes}%, %)$result" case _ => - i"expected type $tp" + d"expected type $tp" } def anonymousTypeMemberStr(tpe: Type) = { @@ -61,12 +61,12 @@ object ErrorReporting { case _: PolyType | _: MethodType => "method" case _ => "value of type" } - i"$kind $tpe" + d"$kind $tpe" } def overloadedAltsStr(alts: List[SingleDenotation]) = - i"overloaded alternatives of ${denotStr(alts.head)} with types\n" + - i" ${alts map (_.info)}%\n %" + d"overloaded alternatives of ${denotStr(alts.head)} with types\n" + + d" ${alts map (_.info)}%\n %" def denotStr(denot: Denotation): String = if (denot.isOverloaded) overloadedAltsStr(denot.alternatives) @@ -96,7 +96,7 @@ object ErrorReporting { case tp: TypeRef => s"with info ${tp.info} / ${tp.prefix.toString} / ${tp.prefix.dealias.toString}" case _ => "" } - i"""type mismatch: + d"""type mismatch: | found : $found | required: $expected""".stripMargin + typerStateStr + explanationStr } @@ -122,7 +122,7 @@ object ErrorReporting { case _ => true } - val s = new InfoString(sc).i(args) + val s = new InfoString(sc).i(args : _*) if (args.forall(isSensical(_))) s else nonSensicalStartTag + s + nonSensicalEndTag } } diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index db549b2d4..93876651a 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -204,8 +204,8 @@ object Implicits { protected def pt: Type protected def argument: tpd.Tree protected def qualify(implicit ctx: Context) = - if (argument.isEmpty) i"match type $pt" - else i"convert from ${argument.tpe} to $pt" + if (argument.isEmpty) d"match type $pt" + else d"convert from ${argument.tpe} to $pt" /** An explanation of the cause of the failure as a string */ def explanation(implicit ctx: Context): String @@ -214,7 +214,7 @@ object Implicits { /** An ambiguous implicits failure */ class AmbiguousImplicits(alt1: TermRef, alt2: TermRef, val pt: Type, val argument: tpd.Tree) extends ExplainedSearchFailure { def explanation(implicit ctx: Context): String = - i"both ${err.refStr(alt1)} and ${err.refStr(alt2)} $qualify" + d"both ${err.refStr(alt1)} and ${err.refStr(alt2)} $qualify" override def postscript(implicit ctx: Context) = "\nNote that implicit conversions cannot be applied because they are ambiguous;" + "\n " + explanation @@ -222,17 +222,17 @@ object Implicits { class NonMatchingImplicit(ref: TermRef, val pt: Type, val argument: tpd.Tree) extends ExplainedSearchFailure { def explanation(implicit ctx: Context): String = - i"${err.refStr(ref)} does not $qualify" + d"${err.refStr(ref)} does not $qualify" } class ShadowedImplicit(ref: TermRef, shadowing: Type, val pt: Type, val argument: tpd.Tree) extends ExplainedSearchFailure { def explanation(implicit ctx: Context): String = - i"${err.refStr(ref)} does $qualify but is shadowed by ${err.refStr(shadowing)}" + d"${err.refStr(ref)} does $qualify but is shadowed by ${err.refStr(shadowing)}" } class DivergingImplicit(ref: TermRef, val pt: Type, val argument: tpd.Tree) extends ExplainedSearchFailure { def explanation(implicit ctx: Context): String = - i"${err.refStr(ref)} produces a diverging implicit search when trying to $qualify" + d"${err.refStr(ref)} produces a diverging implicit search when trying to $qualify" } class FailedImplicit(failures: List[ExplainedSearchFailure], val pt: Type, val argument: tpd.Tree) extends ExplainedSearchFailure { @@ -425,7 +425,7 @@ trait Implicits { self: Typer => if (argument.isEmpty) f(resultType) else ViewProto(f(argument.tpe.widen), f(resultType)) assert(argument.isEmpty || argument.tpe.isValueType || argument.tpe.isInstanceOf[ExprType], - i"found: ${argument.tpe}, expected: $pt") + d"found: ${argument.tpe}, expected: $pt") /** The expected type for the searched implicit */ lazy val fullProto = implicitProto(pt, identity) diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala index a6ac6b6b4..bd44ccac5 100644 --- a/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/src/dotty/tools/dotc/typer/Inferencing.scala @@ -15,7 +15,7 @@ import util.{Stats, SimpleMap} import util.common._ import Decorators._ import Uniques._ -import ErrorReporting.errorType +import ErrorReporting.{errorType, DiagnosticString} import config.Printers._ import collection.mutable @@ -153,7 +153,7 @@ trait Inferencing { this: Checking => case _ => // add synthetic class type val first :: _ = ensureFirstIsClass(parents.tpes) - TypeTree(checkFeasible(first, pos, i"\n in inferred parent $first")).withPos(pos) :: parents + TypeTree(checkFeasible(first, pos, d"\n in inferred parent $first")).withPos(pos) :: parents } /** Interpolate those undetermined type variables in the widened type of this tree diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index d0e78185f..2425bea50 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -209,7 +209,7 @@ class Namer { typer: Typer => ctx.error(s"${preExisting.showLocated} is compiled twice, runid = ${ctx.runId}", tree.pos) } else if ((!ctx.owner.isClass || name.isTypeName) && preExisting.exists) { - ctx.error(i"$name is already defined as $preExisting") + ctx.error(d"$name is already defined as $preExisting") } } diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala index 5345b7396..eb87da58c 100644 --- a/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -118,13 +118,13 @@ trait TypeAssigner { case sym :: Nil => if (sym.owner == pre.typeSymbol) sym.show else sym.showLocated case _ => - i"none of the overloaded alternatives named $name" + d"none of the overloaded alternatives named $name" } val where = if (ctx.owner.exists) s" from ${ctx.owner.enclosingClass}" else "" val whyNot = new StringBuffer alts foreach (_.isAccessibleFrom(pre, superAccess, whyNot)) if (!tpe.isError) - ctx.error(i"$what cannot be accessed as a member of $pre$where.$whyNot", pos) + ctx.error(d"$what cannot be accessed as a member of $pre$where.$whyNot", pos) ErrorType } } else if (d.symbol is TypeParamAccessor) // always dereference type param accessors @@ -145,8 +145,8 @@ trait TypeAssigner { else { if (!site.isErroneous) { ctx.error( - if (name == nme.CONSTRUCTOR) i"$site does not have a constructor" - else i"$name is not a member of $site", pos) + if (name == nme.CONSTRUCTOR) d"$site does not have a constructor" + else d"$name is not a member of $site", pos) } ErrorType } @@ -202,7 +202,7 @@ trait TypeAssigner { case p :: Nil => p case Nil => - errorType(i"$mix does not name a parent class of $cls", tree.pos) + errorType(d"$mix does not name a parent class of $cls", tree.pos) case p :: q :: _ => errorType(s"ambiguous parent class qualifier", tree.pos) } @@ -229,7 +229,7 @@ trait TypeAssigner { case pt: PolyType => val argTypes = args.tpes if (sameLength(argTypes, pt.paramNames)) pt.instantiate(argTypes) - else errorType(i"wrong number of type parameters for ${fn.tpe}; expected: ${pt.paramNames.length}", tree.pos) + else errorType(d"wrong number of type parameters for ${fn.tpe}; expected: ${pt.paramNames.length}", tree.pos) case _ => errorType(s"${err.exprStr(fn)} does not take type parameters", tree.pos) } @@ -296,7 +296,7 @@ trait TypeAssigner { val tparams = tycon.tpe.typeParams val ownType = if (sameLength(tparams, args)) tycon.tpe.appliedTo(args.tpes) - else errorType(i"wrong number of type arguments for ${tycon.tpe}, should be ${tparams.length}", tree.pos) + else errorType(d"wrong number of type arguments for ${tycon.tpe}, should be ${tparams.length}", tree.pos) tree.withType(ownType) } diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index c2488f68c..886404d3a 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -121,8 +121,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit * or defined in */ def bindingString(prec: Int, whereFound: Context, qualifier: String = "") = - if (prec == wildImport || prec == namedImport) i"imported$qualifier by ${whereFound.importInfo}" - else i"defined$qualifier in ${whereFound.owner}" + if (prec == wildImport || prec == namedImport) d"imported$qualifier by ${whereFound.importInfo}" + else d"defined$qualifier in ${whereFound.owner}" /** Check that any previously found result from an inner context * does properly shadow the new one from an outer context. @@ -139,7 +139,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit else { if (!previous.isError && !found.isError) { error( - i"""reference to $name is ambiguous; + d"""reference to $name is ambiguous; |it is both ${bindingString(newPrec, ctx, "")} |and ${bindingString(prevPrec, prevCtx, " subsequently")}""".stripMargin, tree.pos) @@ -154,7 +154,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit def checkUnambiguous(found: Type) = { val other = namedImportRef(site, selectors.tail) if (other.exists && found.exists && (found != other)) - error(i"reference to $name is ambiguous; it is imported twice in ${ctx.tree}", + error(d"reference to $name is ambiguous; it is imported twice in ${ctx.tree}", tree.pos) found } @@ -257,7 +257,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit if (rawType.exists) ensureAccessible(rawType, superAccess = false, tree.pos) else { - error(i"not found: $kind$name", tree.pos) + error(d"not found: $kind$name", tree.pos) ErrorType } checkValue(tree.withType(ownType.underlyingIfRepeated), pt) @@ -412,7 +412,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit ensureNoLocalRefs(block1, pt, forcedDefined = true) } else errorTree(block, - i"local definition of ${leaks.head.name} escapes as part of block's type ${block.tpe}"/*; full type: ${result.tpe.toString}"*/) + d"local definition of ${leaks.head.name} escapes as part of block's type ${block.tpe}"/*; full type: ${result.tpe.toString}"*/) } def typedIf(tree: untpd.If, pt: Type)(implicit ctx: Context) = track("typedIf") { @@ -532,7 +532,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit pt match { case SAMType(meth) if !defn.isFunctionType(pt) && mt <:< meth.info => if (!isFullyDefined(pt, ForceDegree.all)) - ctx.error(i"result type of closure is an underspecified SAM type $pt", tree.pos) + ctx.error(d"result type of closure is an underspecified SAM type $pt", tree.pos) TypeTree(pt) case _ => if (!mt.isDependent) EmptyTree @@ -579,7 +579,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit foreachSubTreeOf(pat) { case b: Bind => if (ctx.scope.lookup(b.name) == NoSymbol) ctx.enter(b.symbol) - else ctx.error(i"duplicate pattern variable: ${b.name}", b.pos) + else ctx.error(d"duplicate pattern variable: ${b.name}", b.pos) case _ => } val guard1 = typedExpr(tree.guard, defn.BooleanType) @@ -609,7 +609,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val proto = if (owner.isConstructor) defn.UnitType else owner.info.finalResultType (from, proto) } - else (EmptyTree, errorType(i"$owner has return statement; needs result type", tree.pos)) + else (EmptyTree, errorType(d"$owner has return statement; needs result type", tree.pos)) else enclMethInfo(cx.outer) } val (from, proto) = enclMethInfo(ctx) @@ -722,7 +722,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val hi1 = typed(hi) // need to do in later phase, as this might cause a cyclic reference error. See pos/t0039.scala // if (!(lo1.tpe <:< hi1.tpe)) - // ctx.error(i"lower bound ${lo1.tpe} does not conform to upper bound ${hi1.tpe}", tree.pos) + // ctx.error(d"lower bound ${lo1.tpe} does not conform to upper bound ${hi1.tpe}", tree.pos) assignType(cpy.TypeBoundsTree(tree, lo1, hi1), lo1, hi1) } @@ -837,7 +837,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val packageContext = if (pkg is Package) ctx.fresh.setOwner(pkg.moduleClass).setTree(tree) else { - ctx.error(i"$pkg is not a packge", tree.pos) + ctx.error(d"$pkg is not a packge", tree.pos) ctx } val stats1 = typedStats(tree.stats, pkg.moduleClass)(packageContext) @@ -1081,7 +1081,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit case Nil => def noMatches = errorTree(tree, - i"""none of the ${err.overloadedAltsStr(altDenots)} + d"""none of the ${err.overloadedAltsStr(altDenots)} |match $expectedStr""".stripMargin) def hasEmptyParams(denot: SingleDenotation) = denot.info.paramTypess == ListOfNil pt match { @@ -1097,7 +1097,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val remainingDenots = alts map (_.denot.asInstanceOf[SingleDenotation]) def all = if (remainingDenots.length == 2) "both" else "all" errorTree(tree, - i"""Ambiguous overload. The ${err.overloadedAltsStr(remainingDenots)} + d"""Ambiguous overload. The ${err.overloadedAltsStr(remainingDenots)} |$all match $expectedStr""".stripMargin) } } @@ -1117,7 +1117,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit case Apply(_, _) => " more" case _ => "" } - (_, _) => errorTree(tree, i"$methodStr does not take$more parameters") + (_, _) => errorTree(tree, d"$methodStr does not take$more parameters") } } @@ -1130,14 +1130,14 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit EmptyTree } val args = (wtp.paramNames, wtp.paramTypes).zipped map { (pname, formal) => - def where = i"parameter $pname of $methodStr" + def where = d"parameter $pname of $methodStr" inferImplicit(formal, EmptyTree, tree.pos.endPos) match { case SearchSuccess(arg, _, _) => arg case ambi: AmbiguousImplicits => implicitArgError(s"ambiguous implicits: ${ambi.explanation} of $where") case failure: SearchFailure => - implicitArgError(i"no implicit argument of type $formal found for $where" + failure.postscript) + implicitArgError(d"no implicit argument of type $formal found for $where" + failure.postscript) } } adapt(tpd.Apply(tree, args), pt) @@ -1152,7 +1152,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit adaptInterpolated(tpd.Apply(tree, Nil), pt) else errorTree(tree, - i"""missing arguments for $methodStr + d"""missing arguments for $methodStr |follow this method with `_' if you want to treat it as a partially applied function""".stripMargin) case _ => if (tree.tpe <:< pt) tree -- cgit v1.2.3