diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-24 16:42:56 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-24 17:57:25 +0200 |
commit | ea78793c618968d8211c5eb353b057b7b5d1bfbb (patch) | |
tree | 7fa45adc9b987358c71e0c01b65c9623da8048b2 /test/files/neg/t5821.scala | |
parent | f406550146250f5a6036d3d778582efa6d68252a (diff) | |
download | scala-ea78793c618968d8211c5eb353b057b7b5d1bfbb.tar.gz scala-ea78793c618968d8211c5eb353b057b7b5d1bfbb.tar.bz2 scala-ea78793c618968d8211c5eb353b057b7b5d1bfbb.zip |
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.
Diffstat (limited to 'test/files/neg/t5821.scala')
-rw-r--r-- | test/files/neg/t5821.scala | 8 |
1 files changed, 8 insertions, 0 deletions
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) +} |