diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/infer2.scala | 12 | ||||
-rwxr-xr-x | test/pending/pos/init.scala | 14 |
2 files changed, 19 insertions, 7 deletions
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())) } diff --git a/test/pending/pos/init.scala b/test/pending/pos/init.scala new file mode 100755 index 0000000000..c51446c804 --- /dev/null +++ b/test/pending/pos/init.scala @@ -0,0 +1,14 @@ +class Foo { + + var cnt = 0 + + class Bar { + cnt = cnt + 1 + val id = cnt + } +} + +object Test extends Application { + val foo = new Foo + Console.println((new foo.Bar).id) +} |