summaryrefslogtreecommitdiff
path: root/test/files/neg/applydynamic_sip.check
diff options
context:
space:
mode:
authoramin <nada.amin@epfl.ch>2012-09-18 17:14:30 +0200
committeramin <nada.amin@epfl.ch>2012-09-19 11:43:40 +0200
commit08e5fd23e73bd2bcccc5f380c0a197d3bb900c02 (patch)
treeef0f01c94fd2b64e71c8c1c39d33acc8af94a885 /test/files/neg/applydynamic_sip.check
parentb0a4d536482c6582bafb383a30f553862aceb00f (diff)
downloadscala-08e5fd23e73bd2bcccc5f380c0a197d3bb900c02.tar.gz
scala-08e5fd23e73bd2bcccc5f380c0a197d3bb900c02.tar.bz2
scala-08e5fd23e73bd2bcccc5f380c0a197d3bb900c02.zip
Fixes SI-6354: improved error messages for Dynamic signature mismatches.
If an error occurs afer a Dynamic rewriting, augment the error message with the rewritten tree and a hint to check the Dynamic method signature.
Diffstat (limited to 'test/files/neg/applydynamic_sip.check')
-rw-r--r--test/files/neg/applydynamic_sip.check50
1 files changed, 49 insertions, 1 deletions
diff --git a/test/files/neg/applydynamic_sip.check b/test/files/neg/applydynamic_sip.check
index 8845f68a52..dcf97b29fc 100644
--- a/test/files/neg/applydynamic_sip.check
+++ b/test/files/neg/applydynamic_sip.check
@@ -7,4 +7,52 @@ applydynamic_sip.scala:8: error: applyDynamicNamed does not support passing a va
applydynamic_sip.scala:9: error: applyDynamicNamed does not support passing a vararg parameter
qual.sel(arg, arg2 = "a2", a2: _*)
^
-three errors found
+applydynamic_sip.scala:18: error: type mismatch;
+ found : String("sel")
+ required: Int
+error after rewriting to Test.this.bad1.selectDynamic("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad1.sel
+ ^
+applydynamic_sip.scala:19: error: type mismatch;
+ found : String("sel")
+ required: Int
+error after rewriting to Test.this.bad1.applyDynamic("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad1.sel(1)
+ ^
+applydynamic_sip.scala:20: error: type mismatch;
+ found : String("sel")
+ required: Int
+error after rewriting to Test.this.bad1.applyDynamicNamed("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad1.sel(a = 1)
+ ^
+applydynamic_sip.scala:21: error: type mismatch;
+ found : String("sel")
+ required: Int
+error after rewriting to Test.this.bad1.updateDynamic("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad1.sel = 1
+ ^
+applydynamic_sip.scala:29: error: Int does not take parameters
+error after rewriting to Test.this.bad2.selectDynamic("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad2.sel
+ ^
+applydynamic_sip.scala:30: error: Int does not take parameters
+error after rewriting to Test.this.bad2.applyDynamic("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad2.sel(1)
+ ^
+applydynamic_sip.scala:31: error: Int does not take parameters
+error after rewriting to Test.this.bad2.applyDynamicNamed("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad2.sel(a = 1)
+ ^
+applydynamic_sip.scala:32: error: Int does not take parameters
+error after rewriting to Test.this.bad2.updateDynamic("sel")
+possible cause: maybe a wrong Dynamic method signature?
+ bad2.sel = 1
+ ^
+11 errors found