From d8dd12a5515e349b61e79d2111b9d54743c0c3c7 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 15 Jun 2006 17:01:56 +0000 Subject: Fixed type inference problem --- test/files/pos/infer2.scala | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'test/files/pos/infer2.scala') diff --git a/test/files/pos/infer2.scala b/test/files/pos/infer2.scala index 66f3d76544..e065219a80 100644 --- a/test/files/pos/infer2.scala +++ b/test/files/pos/infer2.scala @@ -1,10 +1,8 @@ +package test +class Lst[T] +case class cons[T](x: T, xs: Lst[T]) extends Lst[T] +case class nil[T] extends Lst[T] object test { - - def f[a, b <: a](x: b): a = x: a; - def g[a >: b, b](x: b): a = x: a; - - val x: int = f(1); - val y: String = g("") - + Console.println(cons(1, nil())) } -- cgit v1.2.3