aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t7848-interp-warn.check
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t7848-interp-warn.check')
-rw-r--r--tests/untried/neg/t7848-interp-warn.check12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/untried/neg/t7848-interp-warn.check b/tests/untried/neg/t7848-interp-warn.check
new file mode 100644
index 000000000..b7df6d8ce
--- /dev/null
+++ b/tests/untried/neg/t7848-interp-warn.check
@@ -0,0 +1,12 @@
+t7848-interp-warn.scala:8: warning: `$foo` looks like an interpolated identifier! Did you forget the interpolator?
+ "An important $foo message!"
+ ^
+t7848-interp-warn.scala:12: warning: That looks like an interpolated expression! Did you forget the interpolator?
+ "A doubly important ${foo * 2} message!"
+ ^
+t7848-interp-warn.scala:16: warning: `$bar` looks like an interpolated identifier! Did you forget the interpolator?
+ def j = s"Try using '${ "something like $bar" }' instead." // warn
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found