From a16dd265fddd7da26564109f4026fb1d12c1071a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 6 Mar 2003 19:14:59 +0000 Subject: *** empty log message *** --- test/pos/S1.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/pos/S1.scala (limited to 'test/pos/S1.scala') diff --git a/test/pos/S1.scala b/test/pos/S1.scala new file mode 100644 index 0000000000..eba81109b3 --- /dev/null +++ b/test/pos/S1.scala @@ -0,0 +1,13 @@ +/* This is probably no bug, I just don't understand why +** type inference does not find the right instantiation of foo. +** Currently it reports: +** +** S1.scala:12: inferred type arguments [S1] do not conform to +** method foo's type parameter bounds [T <: S1.this.type] +** foo(this); +** ^ +*/ +class S1() { + def foo[T <: this.type](x: T) = x; + foo(this); +} -- cgit v1.2.3