diff options
author | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-02-21 21:38:50 +0100 |
---|---|---|
committer | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-02-21 21:38:50 +0100 |
commit | b7328591473aa2053c093beac71a526639ae0080 (patch) | |
tree | 5548e972ae80395dbbe2351433eed4f1eeff1b21 | |
parent | fbb7865e137e83660257fdc79d19d29ff39c775b (diff) | |
download | scala-b7328591473aa2053c093beac71a526639ae0080.tar.gz scala-b7328591473aa2053c093beac71a526639ae0080.tar.bz2 scala-b7328591473aa2053c093beac71a526639ae0080.zip |
Test for SI-5316
Compiler NPE on 2.9.1 when implicit parameter not found
-rw-r--r-- | test/files/neg/implicits.check | 5 | ||||
-rw-r--r-- | test/files/neg/implicits.scala | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/test/files/neg/implicits.check b/test/files/neg/implicits.check index cd9dfebf48..6d61f7f222 100644 --- a/test/files/neg/implicits.check +++ b/test/files/neg/implicits.check @@ -8,4 +8,7 @@ implicits.scala:46: error: type mismatch; required: List[Mxml] children.toList.flatMap ( e => { ^ -two errors found +implicits.scala:66: error: could not find implicit value for parameter x: Nothing + foo { + ^ +three errors found diff --git a/test/files/neg/implicits.scala b/test/files/neg/implicits.scala index e908fb03e8..878d3a7c99 100644 --- a/test/files/neg/implicits.scala +++ b/test/files/neg/implicits.scala @@ -56,3 +56,19 @@ class Mxml { } } + +// SI-5316 +class Test3 { + def foo(p: => Any)(implicit x: Nothing): Unit = () + + object X + + foo { + val a = 0 + + { + import X._ + a + } + } +} |