From ea78793c618968d8211c5eb353b057b7b5d1bfbb Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Thu, 24 May 2012 16:42:56 +0200 Subject: Closes SI-5821. This was an interesting one. Basically an erroneous import was creating an erroneous symbol for Array (similary for other symbols that were 'found' in this import) which was leading to all sorts of inconsistencies and spurious errors. This wasn't a bug in ContextErrors but rather something that existed for ages and was hidden from the general audience. Review by @paulp. --- test/files/neg/t5821.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/neg/t5821.scala (limited to 'test/files/neg/t5821.scala') diff --git a/test/files/neg/t5821.scala b/test/files/neg/t5821.scala new file mode 100644 index 0000000000..4af0a2bf7f --- /dev/null +++ b/test/files/neg/t5821.scala @@ -0,0 +1,8 @@ +import SthImportant._ + +class Bar + +class Foo2 { + type Sth = Array[Bar] + def foo(xs: Sth): Bar = if ((xs eq null) || (xs.length == 0)) null else xs(0) +} -- cgit v1.2.3