diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-07-15 11:36:06 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-07-15 11:36:06 +0200 |
commit | 87bba9418ca891c436f386207b3b9e70b4a64c71 (patch) | |
tree | 05fc6e419f0fe405d4cb3d3aab64e8c545c42da7 /test/files | |
parent | 64df8bc3cb78a32cccc929d60b226b68ad67d624 (diff) | |
parent | adba40519bc68defb89bf668d814d16447614d9b (diff) | |
download | scala-87bba9418ca891c436f386207b3b9e70b4a64c71.tar.gz scala-87bba9418ca891c436f386207b3b9e70b4a64c71.tar.bz2 scala-87bba9418ca891c436f386207b3b9e70b4a64c71.zip |
Merge pull request #3872 from lrytz/no-adapted-args
Fix -Yno-adapted-args, it would just warn, not err
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t8035-no-adapted-args.check | 21 | ||||
-rw-r--r-- | test/files/neg/t8035-no-adapted-args.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t8035-no-adapted-args.scala | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/files/neg/t8035-no-adapted-args.check b/test/files/neg/t8035-no-adapted-args.check new file mode 100644 index 0000000000..43637b2c1f --- /dev/null +++ b/test/files/neg/t8035-no-adapted-args.check @@ -0,0 +1,21 @@ +t8035-no-adapted-args.scala:4: warning: No automatic adaptation here: use explicit parentheses. + signature: Test.f[T](x: T): Int + given arguments: 1, 2, 3 + after adaptation: Test.f((1, 2, 3): (Int, Int, Int)) + f(1, 2, 3) + ^ +t8035-no-adapted-args.scala:4: error: too many arguments for method f: (x: (Int, Int, Int))Int + f(1, 2, 3) + ^ +t8035-no-adapted-args.scala:5: warning: No automatic adaptation here: use explicit parentheses. + signature: Test.f[T](x: T): Int + given arguments: <none> + after adaptation: Test.f((): Unit) + f() + ^ +t8035-no-adapted-args.scala:5: error: not enough arguments for method f: (x: Unit)Int. +Unspecified value parameter x. + f() + ^ +two warnings found +two errors found diff --git a/test/files/neg/t8035-no-adapted-args.flags b/test/files/neg/t8035-no-adapted-args.flags new file mode 100644 index 0000000000..b3e8c505e2 --- /dev/null +++ b/test/files/neg/t8035-no-adapted-args.flags @@ -0,0 +1 @@ +-Yno-adapted-args
\ No newline at end of file diff --git a/test/files/neg/t8035-no-adapted-args.scala b/test/files/neg/t8035-no-adapted-args.scala new file mode 100644 index 0000000000..82690ebe94 --- /dev/null +++ b/test/files/neg/t8035-no-adapted-args.scala @@ -0,0 +1,6 @@ +object Test { + def f[T](x: T) = 0 + + f(1, 2, 3) + f() +} |