summaryrefslogtreecommitdiff
path: root/test/files/neg/forgot-interpolator.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-09-18 18:06:59 -0700
committerSom Snytt <som.snytt@gmail.com>2013-09-18 20:36:16 -0700
commita5bae8f17cb96feb75fdc81480827ce44746fd1d (patch)
treecf468c6235fdb8df18c1bffb919431b936e817d1 /test/files/neg/forgot-interpolator.scala
parent40d57db2998d9b2cc438bb268dc859d04b5df55c (diff)
downloadscala-a5bae8f17cb96feb75fdc81480827ce44746fd1d.tar.gz
scala-a5bae8f17cb96feb75fdc81480827ce44746fd1d.tar.bz2
scala-a5bae8f17cb96feb75fdc81480827ce44746fd1d.zip
SI-7848 Xlint no warn on $sym with params
This idea brought to you by retronym.
Diffstat (limited to 'test/files/neg/forgot-interpolator.scala')
-rw-r--r--test/files/neg/forgot-interpolator.scala32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/files/neg/forgot-interpolator.scala b/test/files/neg/forgot-interpolator.scala
index d67db82643..5067f1dce9 100644
--- a/test/files/neg/forgot-interpolator.scala
+++ b/test/files/neg/forgot-interpolator.scala
@@ -13,3 +13,35 @@ class B {
class C {
def f = """Put the ${println("bippy")} in the bippy!""" // warn
}
+
+package object test {
+ def aleppo = 9
+ def greppo(n: Int) = ???
+ def zappos(n: Int)(implicit ord: math.Ordering[Int]) = ???
+ def hippo(implicit n: Int) = ???
+}
+
+package test {
+ // not sure if overloading is kosher in pkg obj yet
+ class Doo {
+ def beppo(i: Int) = 8 * i
+ def beppo = 8
+ class Dah extends Doo {
+ def f = "$beppo was a marx bros who saw dollars." // warn
+ }
+ }
+ class E {
+ def f = "$aleppo is a pepper and a city." // warn
+ }
+ class Bar {
+ private def bar = 8
+ }
+ class Baz extends Bar {
+ def f = "$bar is private, shall we warn just in case?" // warn
+ }
+ class G {
+ def g = "$greppo takes an arg" // no warn
+ def z = "$zappos takes an arg too" // no warn
+ def h = "$hippo takes an implicit" // warn
+ }
+}