From b7328591473aa2053c093beac71a526639ae0080 Mon Sep 17 00:00:00 2001 From: Szabolcs Berecz Date: Tue, 21 Feb 2012 21:38:50 +0100 Subject: Test for SI-5316 Compiler NPE on 2.9.1 when implicit parameter not found --- test/files/neg/implicits.check | 5 ++++- test/files/neg/implicits.scala | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'test/files/neg') 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 + } + } +} -- cgit v1.2.3