From 432f9368011e0fd9e89ca0e18082bfec180baf32 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 10 Sep 2012 09:40:03 -0700 Subject: Experimental option -Ybreak-cycles. Overcomes cycles encountered during classfile parsing in possibly sketchy fashion. "illegal cyclic reference involving class Foo" is the watchword. See SI-3809. --- test/pending/pos/t4612.scala | 15 +++++++++++++++ test/pending/pos/t4744/Bar.scala | 1 + test/pending/pos/t4744/Foo.java | 1 + test/pending/pos/t5082.scala | 8 ++++++++ 4 files changed, 25 insertions(+) create mode 100644 test/pending/pos/t4612.scala create mode 100644 test/pending/pos/t4744/Bar.scala create mode 100644 test/pending/pos/t4744/Foo.java create mode 100644 test/pending/pos/t5082.scala (limited to 'test/pending') diff --git a/test/pending/pos/t4612.scala b/test/pending/pos/t4612.scala new file mode 100644 index 0000000000..a93c12ef01 --- /dev/null +++ b/test/pending/pos/t4612.scala @@ -0,0 +1,15 @@ +class CyclicReferenceCompilerBug { + trait Trait[A] { + def foo: A + } + + class Class extends Trait[Class] { + def foo = new Class + + trait OtherTrait extends Trait[OtherTrait] { + self: Class => + + def foo = new Class + } + } +} diff --git a/test/pending/pos/t4744/Bar.scala b/test/pending/pos/t4744/Bar.scala new file mode 100644 index 0000000000..1fb6d78973 --- /dev/null +++ b/test/pending/pos/t4744/Bar.scala @@ -0,0 +1 @@ +class Bar { val quux = new Foo[java.lang.Integer]() } diff --git a/test/pending/pos/t4744/Foo.java b/test/pending/pos/t4744/Foo.java new file mode 100644 index 0000000000..6c764d0470 --- /dev/null +++ b/test/pending/pos/t4744/Foo.java @@ -0,0 +1 @@ +public class Foo> {} diff --git a/test/pending/pos/t5082.scala b/test/pending/pos/t5082.scala new file mode 100644 index 0000000000..20a6cfc55f --- /dev/null +++ b/test/pending/pos/t5082.scala @@ -0,0 +1,8 @@ +object Test { + sealed trait A + case object A1 extends A +} + +trait Something[T] + +case class Test() extends Something[Test.A] -- cgit v1.2.3