diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-05-23 21:23:25 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-05-23 22:38:44 +0200 |
commit | d9c8ccce14bdd4f9364af4941cd47edbfec0c8ce (patch) | |
tree | 3645f00f5398786279f0a070c3595d30fc27cd99 /test | |
parent | f81a4f92967a2dd69784864e9ab9e1624d7db35b (diff) | |
download | scala-d9c8ccce14bdd4f9364af4941cd47edbfec0c8ce.tar.gz scala-d9c8ccce14bdd4f9364af4941cd47edbfec0c8ce.tar.bz2 scala-d9c8ccce14bdd4f9364af4941cd47edbfec0c8ce.zip |
SI-7509 Avoid crasher as erronous args flow through NamesDefaults
The fix for SI-7238 caused this regression.
This commit marks taints whole Apply with an ErrorType if it
has an erroneous argument, so as to stop a later crash trying
to further process the tree.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t7509.check | 12 | ||||
-rw-r--r-- | test/files/neg/t7509.scala | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t7509.check b/test/files/neg/t7509.check new file mode 100644 index 0000000000..eaa6303cf5 --- /dev/null +++ b/test/files/neg/t7509.check @@ -0,0 +1,12 @@ +t7509.scala:3: error: inferred type arguments [Int] do not conform to method crash's type parameter bounds [R <: AnyRef] + crash(42) + ^ +t7509.scala:3: error: type mismatch; + found : Int(42) + required: R + crash(42) + ^ +t7509.scala:3: error: could not find implicit value for parameter ev: R + crash(42) + ^ +three errors found diff --git a/test/files/neg/t7509.scala b/test/files/neg/t7509.scala new file mode 100644 index 0000000000..3cba801ea7 --- /dev/null +++ b/test/files/neg/t7509.scala @@ -0,0 +1,4 @@ +object NMWE { + def crash[R <: AnyRef](f: R)(implicit ev: R): Any = ??? + crash(42) +} |