diff options
author | Paul Phillips <paulp@improving.org> | 2013-03-25 12:57:01 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-25 12:57:01 -0700 |
commit | e17121d16950545d7e70ee255556ad11409bf8c3 (patch) | |
tree | e8b69d56edf45c224158981272bef69561637dff /test/files | |
parent | 33503d119e45379c555d6b3c9ec5c5217897126b (diff) | |
parent | b95ca32062ae980fb45b3e93d8c90219bc1d2530 (diff) | |
download | scala-e17121d16950545d7e70ee255556ad11409bf8c3.tar.gz scala-e17121d16950545d7e70ee255556ad11409bf8c3.tar.bz2 scala-e17121d16950545d7e70ee255556ad11409bf8c3.zip |
Merge pull request #2306 from retronym/ticket/7299
SI-7299 Improve error message for eta-expanding 23+ param method
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t7299.check | 7 | ||||
-rw-r--r-- | test/files/neg/t7299.scala | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t7299.check b/test/files/neg/t7299.check new file mode 100644 index 0000000000..74340c4841 --- /dev/null +++ b/test/files/neg/t7299.check @@ -0,0 +1,7 @@ +t7299.scala:4: error: implementation restricts functions to 22 parameters + val eta1 = f _ + ^ +t7299.scala:5: error: implementation restricts functions to 22 parameters + val eta2 = g[Any] _ + ^ +two errors found diff --git a/test/files/neg/t7299.scala b/test/files/neg/t7299.scala new file mode 100644 index 0000000000..f3aae5ce5d --- /dev/null +++ b/test/files/neg/t7299.scala @@ -0,0 +1,6 @@ +object Test { + def f(a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int) = 0 + def g[A](a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int) = 0 + val eta1 = f _ + val eta2 = g[Any] _ +} |