summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
-rw-r--r--test/files/neg/t7848-interp-warn.check5
2 files changed, 2 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 80e9e16178..88b9b2c71c 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -4869,7 +4869,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
}
// Warn about likely interpolated strings which are missing their interpolators
- def warnMissingInterpolator(tree: Literal) {
+ def warnMissingInterpolator(tree: Literal) = if (!isPastTyper) {
// Unfortunately implicit not found strings looks for all the world like
// missing interpolators.
def isArgToImplicitNotFound = context.enclosingApply.tree match {
diff --git a/test/files/neg/t7848-interp-warn.check b/test/files/neg/t7848-interp-warn.check
index b2a8f59a63..cbdc9f4c27 100644
--- a/test/files/neg/t7848-interp-warn.check
+++ b/test/files/neg/t7848-interp-warn.check
@@ -4,9 +4,6 @@ t7848-interp-warn.scala:7: warning: `$foo` looks like an interpolated identifier
t7848-interp-warn.scala:11: warning: That looks like an interpolated expression! Did you forget the interpolator?
"A doubly important ${foo * 2} message!"
^
-t7848-interp-warn.scala:9: warning: That looks like an interpolated expression! Did you forget the interpolator?
- def g = {
- ^
error: No warnings can be incurred under -Xfatal-warnings.
-three warnings found
+two warnings found
one error found