diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-21 22:56:08 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-26 22:55:00 -0700 |
commit | 391e2843f420bb4686b974b18ac361c9bb49465c (patch) | |
tree | 580deff7251bd37f57fc4b432c6c772f55ff98f0 /test/files/neg/sammy_error.scala | |
parent | b0b0abab89f0c40ba3c45b4a1f7bada31040d55a (diff) | |
download | scala-391e2843f420bb4686b974b18ac361c9bb49465c.tar.gz scala-391e2843f420bb4686b974b18ac361c9bb49465c.tar.bz2 scala-391e2843f420bb4686b974b18ac361c9bb49465c.zip |
Don't adapt erroneous tree to SAM type.
Do not report second error. Go straight to the exit.
Based on review by Jason.
Diffstat (limited to 'test/files/neg/sammy_error.scala')
-rw-r--r-- | test/files/neg/sammy_error.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/sammy_error.scala b/test/files/neg/sammy_error.scala new file mode 100644 index 0000000000..dbddebf325 --- /dev/null +++ b/test/files/neg/sammy_error.scala @@ -0,0 +1,7 @@ +trait F1[A, B] { def apply(a: A): B } + +class Test { + def foo[A](f1: F1[A, A]) = f1 + + foo(x => x) // should result in only one error (the second one stemmed from adapting to SAM when the tree was erroneous) +} |