diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-22 20:33:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-22 20:33:43 +0000 |
commit | a187f432f712734d00504e8250955272220eb418 (patch) | |
tree | b05903a93383f858d945f7493abbcb8da487bf5f /test/files/pos | |
parent | 9c0ac8b712db643f83c73b0bfbb1543a5a61f984 (diff) | |
download | scala-a187f432f712734d00504e8250955272220eb418.tar.gz scala-a187f432f712734d00504e8250955272220eb418.tar.bz2 scala-a187f432f712734d00504e8250955272220eb418.zip |
When inferring a type is scala.Whatever, have t...
When inferring a type is scala.Whatever, have to take care to _root_
qualify it so a package named scala doesn't subvert it. Fixes #430.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug430-feb09.scala | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/files/pos/bug430-feb09.scala b/test/files/pos/bug430-feb09.scala new file mode 100644 index 0000000000..2daf0b305a --- /dev/null +++ b/test/files/pos/bug430-feb09.scala @@ -0,0 +1,34 @@ +// Compiles +package a { + case class A[T]() +} + +// Compiles +package b.scala { + class B[T] +} + +// Doesn't compile: type Nothing is not a member of c.scala +package c.scala { + case class C[T]() +} + +// Doesn't compile: type Nothing is not a member of d.scala +package d.scala.d { + case class D[T]() +} + +// Doesn't compile: type Any is not a member of e.scala +package e.scala { + case class E[T >: Nothing]() +} + +// Compiles +package f.scala { + case class F[T >: Nothing <: Any]() +} + +// Doesn't compile: type <byname> is not a member of package h.scala +package h.scala { + case class H(s: String)(t: =>String) +}
\ No newline at end of file |