From a187f432f712734d00504e8250955272220eb418 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 22 Feb 2009 20:33:43 +0000 Subject: 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. --- test/files/pos/bug430-feb09.scala | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/files/pos/bug430-feb09.scala (limited to 'test/files/pos/bug430-feb09.scala') 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 is not a member of package h.scala +package h.scala { + case class H(s: String)(t: =>String) +} \ No newline at end of file -- cgit v1.2.3