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/buildmanager/t2792/t2792.check | 3 +++ test/files/neg/t5821.check | 4 ++++ test/files/neg/t5821.scala | 8 ++++++++ test/files/neg/t639.check | 5 ++++- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 test/files/neg/t5821.check create mode 100644 test/files/neg/t5821.scala (limited to 'test') diff --git a/test/files/buildmanager/t2792/t2792.check b/test/files/buildmanager/t2792/t2792.check index 68e14c6386..00a2b83469 100644 --- a/test/files/buildmanager/t2792/t2792.check +++ b/test/files/buildmanager/t2792/t2792.check @@ -9,3 +9,6 @@ compiling Set(A2.scala) A2.scala:2: error: stable identifier required, but A.x found. import A.x.y ^ +A2.scala:3: error: not found: value y + val z = y + ^ diff --git a/test/files/neg/t5821.check b/test/files/neg/t5821.check new file mode 100644 index 0000000000..f9c00604bc --- /dev/null +++ b/test/files/neg/t5821.check @@ -0,0 +1,4 @@ +t5821.scala:1: error: not found: object SthImportant +import SthImportant._ + ^ +one error found 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) +} diff --git a/test/files/neg/t639.check b/test/files/neg/t639.check index 3b53da0515..6d41d872de 100644 --- a/test/files/neg/t639.check +++ b/test/files/neg/t639.check @@ -1,4 +1,7 @@ t639.scala:3: error: not found: object a import a._ ^ -one error found +t639.scala:5: error: not found: type B +@B + ^ +two errors found -- cgit v1.2.3