summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2012-05-16 15:24:59 +0200
committerLukas Rytz <lukas.rytz@epfl.ch>2012-05-18 10:58:14 +0200
commit4669ac180e58daf97ac7f73af4622434b439631d (patch)
treed1397c1b58e6863cf33174be038ad3bafa250e18 /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
parentb48aa909cefc4811e208f491d22d664538d75bad (diff)
downloadscala-4669ac180e58daf97ac7f73af4622434b439631d.tar.gz
scala-4669ac180e58daf97ac7f73af4622434b439631d.tar.bz2
scala-4669ac180e58daf97ac7f73af4622434b439631d.zip
better feedback for SI-5044
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index 0c1638b76f..769cc6dbc1 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -1034,6 +1034,12 @@ trait ContextErrors {
setError(arg)
} else arg
}
+
+ def WarnAfterNonSilentRecursiveInference(param: Symbol, arg: Tree)(implicit context: Context) = {
+ val note = "type-checking the invocation of "+ param.owner +" checks if the named argument expression '"+ param.name + " = ...' is a valid assignment\n"+
+ "in the current scope. The resulting type inference error (see above) can be fixed by providing an explicit type in the local definition for "+ param.name +"."
+ context.warning(arg.pos, note)
+ }
def UnknownParameterNameNamesDefaultError(arg: Tree, name: Name)(implicit context: Context) = {
issueNormalTypeError(arg, "unknown parameter name: " + name)