diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-10 09:40:03 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-09 14:17:34 -0700 |
commit | 432f9368011e0fd9e89ca0e18082bfec180baf32 (patch) | |
tree | 155dfa5932b5049ba80063c5a7758cf9c0305f0c /test | |
parent | c61c18e042d0fa41a09fea29a8dcaa2e08a40a63 (diff) | |
download | scala-432f9368011e0fd9e89ca0e18082bfec180baf32.tar.gz scala-432f9368011e0fd9e89ca0e18082bfec180baf32.tar.bz2 scala-432f9368011e0fd9e89ca0e18082bfec180baf32.zip |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/lib/jsoup-1.3.1.jar.desired.sha1 | 1 | ||||
-rw-r--r-- | test/files/pos/cycle-bounds.scala | 1 | ||||
-rw-r--r-- | test/files/pos/cycle-jsoup.flags | 1 | ||||
-rw-r--r-- | test/files/pos/cycle-jsoup.scala | 5 | ||||
-rw-r--r-- | test/files/pos/cycle.flags | 1 | ||||
-rw-r--r-- | test/files/pos/cycle/J_1.java | 16 | ||||
-rw-r--r-- | test/files/pos/cycle/X_2.scala | 3 | ||||
-rw-r--r-- | test/pending/pos/t4612.scala | 15 | ||||
-rw-r--r-- | test/pending/pos/t4744/Bar.scala | 1 | ||||
-rw-r--r-- | test/pending/pos/t4744/Foo.java | 1 | ||||
-rw-r--r-- | test/pending/pos/t5082.scala | 8 |
11 files changed, 53 insertions, 0 deletions
diff --git a/test/files/lib/jsoup-1.3.1.jar.desired.sha1 b/test/files/lib/jsoup-1.3.1.jar.desired.sha1 new file mode 100644 index 0000000000..46fa3dae9d --- /dev/null +++ b/test/files/lib/jsoup-1.3.1.jar.desired.sha1 @@ -0,0 +1 @@ +346d3dff4088839d6b4d163efa2892124039d216 ?jsoup-1.3.1.jar diff --git a/test/files/pos/cycle-bounds.scala b/test/files/pos/cycle-bounds.scala new file mode 100644 index 0000000000..0aa7aa552b --- /dev/null +++ b/test/files/pos/cycle-bounds.scala @@ -0,0 +1 @@ +class Foo[T <: Comparable[_ >: T]] diff --git a/test/files/pos/cycle-jsoup.flags b/test/files/pos/cycle-jsoup.flags new file mode 100644 index 0000000000..ca20f55172 --- /dev/null +++ b/test/files/pos/cycle-jsoup.flags @@ -0,0 +1 @@ +-Ybreak-cycles diff --git a/test/files/pos/cycle-jsoup.scala b/test/files/pos/cycle-jsoup.scala new file mode 100644 index 0000000000..879e693537 --- /dev/null +++ b/test/files/pos/cycle-jsoup.scala @@ -0,0 +1,5 @@ +object Test { + def main(args : Array[String]) { + org.jsoup.Jsoup.parse(null: java.net.URL, 3000) + } +} diff --git a/test/files/pos/cycle.flags b/test/files/pos/cycle.flags new file mode 100644 index 0000000000..ca20f55172 --- /dev/null +++ b/test/files/pos/cycle.flags @@ -0,0 +1 @@ +-Ybreak-cycles diff --git a/test/files/pos/cycle/J_1.java b/test/files/pos/cycle/J_1.java new file mode 100644 index 0000000000..0cc218eebe --- /dev/null +++ b/test/files/pos/cycle/J_1.java @@ -0,0 +1,16 @@ +package bar; + +public class J_1 { + public void f(C.D arg) { + } +} + +class B extends J_1 { + public void g(C.D arg) { + } +} + +class C extends B { + public class D { + } +} diff --git a/test/files/pos/cycle/X_2.scala b/test/files/pos/cycle/X_2.scala new file mode 100644 index 0000000000..c1840f3b99 --- /dev/null +++ b/test/files/pos/cycle/X_2.scala @@ -0,0 +1,3 @@ +import bar.J_1._ //<--- illegal cyclic reference involving + +class X 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<T extends Comparable<? super T>> {} 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] |