diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-07-10 15:11:04 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-07-15 10:18:46 +0200 |
commit | adba40519bc68defb89bf668d814d16447614d9b (patch) | |
tree | ff6c357ac9813f8dd0d86ff43a6d41e7debbd509 /test/files | |
parent | aea6519685561ee076e7fdaac48c2bf970389b83 (diff) | |
download | scala-adba40519bc68defb89bf668d814d16447614d9b.tar.gz scala-adba40519bc68defb89bf668d814d16447614d9b.tar.bz2 scala-adba40519bc68defb89bf668d814d16447614d9b.zip |
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() +} |