summaryrefslogtreecommitdiff
path: root/test/files/neg/t3971.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-27 09:25:37 -0700
committerPaul Phillips <paulp@improving.org>2013-09-27 09:42:37 -0700
commit7fa77afa9322d4d31b132d1c1c8b57c7a3199348 (patch)
tree17bef811bee14d52333af56120a802d02a013948 /test/files/neg/t3971.check
parent1a3c16fd36407bb2308bbb84739601544ac4a2e5 (diff)
downloadscala-7fa77afa9322d4d31b132d1c1c8b57c7a3199348.tar.gz
scala-7fa77afa9322d4d31b132d1c1c8b57c7a3199348.tar.bz2
scala-7fa77afa9322d4d31b132d1c1c8b57c7a3199348.zip
SI-3971 error message carat mispoints at curried methods.
Point at the beginning of the first argument list when reporting an error, as this is most easily associated with the application taking place (which may involve multiple applies in succession.) Thanks to retronym for figuring out why issuing a better error message broke the compiler on non-erroneous compile runs. The changes to "treesInResult" are the consequence.
Diffstat (limited to 'test/files/neg/t3971.check')
-rw-r--r--test/files/neg/t3971.check21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/t3971.check b/test/files/neg/t3971.check
new file mode 100644
index 0000000000..8685119876
--- /dev/null
+++ b/test/files/neg/t3971.check
@@ -0,0 +1,21 @@
+t3971.scala:6: error: type mismatch;
+ found : Int
+ required: String
+ f(g("abc")("def")) // g returns Int, needs String
+ ^
+t3971.scala:7: error: type mismatch;
+ found : Int(5)
+ required: String
+ f(5)
+ ^
+t3971.scala:8: error: type mismatch;
+ found : Int
+ required: String
+ f(h("abc"))
+ ^
+t3971.scala:11: error: type mismatch;
+ found : Boolean
+ required: String
+ ({"ab".reverse; "ba".equals})(0): String
+ ^
+four errors found