diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t3761-overload-byname.check | 4 | ||||
-rw-r--r-- | test/files/run/t3761-overload-byname.scala | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t3761-overload-byname.check b/test/files/run/t3761-overload-byname.check new file mode 100644 index 0000000000..9410a4fe65 --- /dev/null +++ b/test/files/run/t3761-overload-byname.check @@ -0,0 +1,4 @@ +hello! +hello working world +goodnight! +goodnight moon, nobody, noises everywhere diff --git a/test/files/run/t3761-overload-byname.scala b/test/files/run/t3761-overload-byname.scala new file mode 100644 index 0000000000..0e2c9b1059 --- /dev/null +++ b/test/files/run/t3761-overload-byname.scala @@ -0,0 +1,18 @@ + +class OverTheTop { + def info0(m: String) = m + "!" + def info0(m: String, args: Any*) = m +" "+ args.mkString(" ") + + // as reported + def info1(m: =>String) = m + "!" + def info1(m: =>String, args: Any*) = m +" "+ args.mkString(", ") +} +object Test { + def main(args: Array[String]) { + val top = new OverTheTop + println(top.info0("hello")) + println(top.info0("hello","working","world")) + println(top.info1("goodnight")) + println(top.info1("goodnight", "moon", "nobody", "noises everywhere")) + } +} |