From 7fa78597bf58a7759303095121a432cb258f447c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 10 Mar 2014 17:48:55 +0100 Subject: Fix problems related to t0039 This test case exercised several problems: 1.)2.) Two ways to run into a cyclic references. Fixed by - assuming an early info when completing a typedef, similarly to what is done for a classdef - doing wellformed bounds checking in a later phase. Failure to check whether arguments correspond to F-bounds. - a substitution was missing. --- tests/new/t0039.scala | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/new/t0039.scala (limited to 'tests/new') diff --git a/tests/new/t0039.scala b/tests/new/t0039.scala new file mode 100644 index 000000000..652c606b0 --- /dev/null +++ b/tests/new/t0039.scala @@ -0,0 +1,6 @@ +abstract class Extensible[A, This <: Extensible[A, This]](x: A, xs: This) { self: This => + def mkObj(x: A, xs: This): This; +} +class Fixed[A](x: A, xs: Fixed[A]) extends Extensible[A, Fixed[A]](x, xs) { + def mkObj(x: A, xs: Fixed[A]) = new Fixed(x, xs); +} -- cgit v1.2.3