From 717d95c97848717fc4b09622750fcab7508e05b3 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 7 Oct 2006 11:58:56 +0000 Subject: introduced type approximations instead of malfo... introduced type approximations instead of malformed type errors --- test/files/neg/abstract.check | 18 ++++++++++-------- test/files/neg/abstract.scala | 10 ++++++---- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/files/neg/abstract.check b/test/files/neg/abstract.check index 87fb66f946..86fded0fce 100644 --- a/test/files/neg/abstract.check +++ b/test/files/neg/abstract.check @@ -1,9 +1,11 @@ -abstract.scala:5 error: method bar cannot be accessed in A.this.T - because its instance type ()A.this.T#T contains a malformed type: A.this.T#T - def foo1 = bar().bar(); - ^ -abstract.scala:7 error: method bar cannot be accessed in A - because its instance type ()A#T contains a malformed type: A#T - def foo3 = baz().bar(); - ^ +abstract.scala:6 error: type mismatch; + found : A + required: A.this.T + def foo2: T = bar().baz(); + ^ +abstract.scala:9 error: type mismatch; + found : A + required: A.this.T + def foo5: T = baz().baz(); + ^ two errors found diff --git a/test/files/neg/abstract.scala b/test/files/neg/abstract.scala index 41cfc81309..f8ecae16fa 100644 --- a/test/files/neg/abstract.scala +++ b/test/files/neg/abstract.scala @@ -2,8 +2,10 @@ trait A { type T <: A; def baz(): A; def bar(): T; - def foo1 = bar().bar(); - def foo2 = bar().baz(); - def foo3 = baz().bar(); - def foo4 = baz().baz(); + def foo1: A = bar().bar(); + def foo2: T = bar().baz(); + def foo3 = bar().baz(); + def foo4: A = baz().bar(); + def foo5: T = baz().baz(); + def foo6 = baz().baz(); } -- cgit v1.2.3