From fff0f50773b45690d571852b139bd6da7b6a45ae Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 24 Feb 2013 14:44:57 +0100 Subject: Name boolean arguments in src/compiler. What would you prefer? adaptToMemberWithArgs(tree, qual, name, mode, false, false) Or: adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false) --- src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala index 98c5e31ffe..46740cd03c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala +++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala @@ -236,8 +236,8 @@ trait TypeDiagnostics { val invariant = param.variance.isInvariant if (conforms) Some("") - else if ((arg <:< reqArg) && invariant) mkMsg(true) // covariant relationship - else if ((reqArg <:< arg) && invariant) mkMsg(false) // contravariant relationship + else if ((arg <:< reqArg) && invariant) mkMsg(isSubtype = true) // covariant relationship + else if ((reqArg <:< arg) && invariant) mkMsg(isSubtype = false) // contravariant relationship else None // we assume in other cases our ham-fisted advice will merely serve to confuse } val messages = relationships.flatten @@ -546,7 +546,7 @@ trait TypeDiagnostics { // It is presumed if you are using a -Y option you would really like to hear // the warnings you've requested. if (settings.warnDeadCode.value && context.unit.exists && treeOK(tree) && exprOK) - context.warning(tree.pos, "dead code following this construct", true) + context.warning(tree.pos, "dead code following this construct", force = true) tree } -- cgit v1.2.3