diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-10-08 22:28:00 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-10-09 13:56:22 +0200 |
commit | 83feb8609161bf19247a8a310f8c5a9e3d8469f5 (patch) | |
tree | 82c3569de970c25e121554809134ffb388ce50ff /test/files/neg/applydynamic_sip.check | |
parent | 7e4a97e532a9adcd0a6d014d948702aebec3541f (diff) | |
download | scala-83feb8609161bf19247a8a310f8c5a9e3d8469f5.tar.gz scala-83feb8609161bf19247a8a310f8c5a9e3d8469f5.tar.bz2 scala-83feb8609161bf19247a8a310f8c5a9e3d8469f5.zip |
SI-7985 Typecheck args after failure to typecheck function
`missing1.foo(missing2)` now reports `missing1` and `missing2` as
not found. Previously, only the first was reported.
The arguments are typed with an expected type ErrorType. We propagate
this through as the inferred type of anonymous function parameters
to avoid issuing cascading "missing parameter type" errors in code
like:
scala> Nil.mapp(x => abracadabra)
<console>:8: error: value mapp is not a member of object Nil
Nil.mapp(x => abracadabra)
^
<console>:8: error: not found: value abracadabra
Nil.mapp(x => abracadabra)
^
This was in response to unwanted changes in the output of existing
neg tests; no new test is added.
Similarly, we refine the errors in neg/t6436b.scala by to avoid
cascaded errors after:
type mismatch; found: StringContext, required: ?{def q: ?}
Diffstat (limited to 'test/files/neg/applydynamic_sip.check')
-rw-r--r-- | test/files/neg/applydynamic_sip.check | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/files/neg/applydynamic_sip.check b/test/files/neg/applydynamic_sip.check index dcf97b29fc..f28f26c147 100644 --- a/test/files/neg/applydynamic_sip.check +++ b/test/files/neg/applydynamic_sip.check @@ -4,9 +4,18 @@ applydynamic_sip.scala:7: error: applyDynamic does not support passing a vararg applydynamic_sip.scala:8: error: applyDynamicNamed does not support passing a vararg parameter qual.sel(arg = a, a2: _*) ^ +applydynamic_sip.scala:8: error: not found: value arg + qual.sel(arg = a, a2: _*) + ^ applydynamic_sip.scala:9: error: applyDynamicNamed does not support passing a vararg parameter qual.sel(arg, arg2 = "a2", a2: _*) ^ +applydynamic_sip.scala:9: error: not found: value arg + qual.sel(arg, arg2 = "a2", a2: _*) + ^ +applydynamic_sip.scala:9: error: not found: value arg2 + qual.sel(arg, arg2 = "a2", a2: _*) + ^ applydynamic_sip.scala:18: error: type mismatch; found : String("sel") required: Int @@ -28,6 +37,9 @@ error after rewriting to Test.this.bad1.applyDynamicNamed("sel") possible cause: maybe a wrong Dynamic method signature? bad1.sel(a = 1) ^ +applydynamic_sip.scala:20: error: reassignment to val + bad1.sel(a = 1) + ^ applydynamic_sip.scala:21: error: type mismatch; found : String("sel") required: Int @@ -50,9 +62,12 @@ error after rewriting to Test.this.bad2.applyDynamicNamed("sel") possible cause: maybe a wrong Dynamic method signature? bad2.sel(a = 1) ^ +applydynamic_sip.scala:31: error: reassignment to val + 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 +16 errors found |