diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-17 17:16:28 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-26 22:54:07 -0700 |
commit | 040c0434d456dd75a174147d8a0c4cab37266ba6 (patch) | |
tree | f5e0dd086c2610d5d56dd9701028e11665ac2671 /test/files/neg/sammy_overload.check | |
parent | a2795ba77c0e7b56b0a522eae0cca298af0ac1f1 (diff) | |
download | scala-040c0434d456dd75a174147d8a0c4cab37266ba6.tar.gz scala-040c0434d456dd75a174147d8a0c4cab37266ba6.tar.bz2 scala-040c0434d456dd75a174147d8a0c4cab37266ba6.zip |
More fixes based on feedback by Lukas
Crucially, the fully-defined expected type must be checked for
conformance to the original expected type!!
The logic in adaptToSam that checks whether pt is fully defined
probably needs some more thought. See pos/t8310 for a good test
case. Argument type checking is a challenge, as we first check
against a lenient pt (this lenient expected type has wildcards,
and thus is not fully defined, but we should still consider sam
adaptation a success even if we end up with wildcards for some
unknown type parameters, they should be determined later).
Diffstat (limited to 'test/files/neg/sammy_overload.check')
-rw-r--r-- | test/files/neg/sammy_overload.check | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/sammy_overload.check b/test/files/neg/sammy_overload.check new file mode 100644 index 0000000000..903d7c88f4 --- /dev/null +++ b/test/files/neg/sammy_overload.check @@ -0,0 +1,7 @@ +sammy_overload.scala:11: error: missing parameter type for expanded function ((x$1: <error>) => x$1.toString) + O.m(_.toString) // error expected: eta-conversion breaks down due to overloading + ^ +sammy_overload.scala:12: error: missing parameter type + O.m(x => x) // error expected: needs param type + ^ +two errors found |