From 19ce8f9f8f030bd566e8536599d1f5cb0ccd4745 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Sun, 29 Nov 2020 16:14:45 +0100 Subject: [PATCH] Fix #9229: add test --- tests/init/pos/i9229/A_1.scala | 7 +++++++ tests/init/pos/i9229/B_2.scala | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/init/pos/i9229/A_1.scala create mode 100644 tests/init/pos/i9229/B_2.scala diff --git a/tests/init/pos/i9229/A_1.scala b/tests/init/pos/i9229/A_1.scala new file mode 100644 index 000000000000..2c4c1f886f53 --- /dev/null +++ b/tests/init/pos/i9229/A_1.scala @@ -0,0 +1,7 @@ +package p + +class A { + class Link + object Link + def Link(tag: String): Link = ??? +} \ No newline at end of file diff --git a/tests/init/pos/i9229/B_2.scala b/tests/init/pos/i9229/B_2.scala new file mode 100644 index 000000000000..87e90a39ef75 --- /dev/null +++ b/tests/init/pos/i9229/B_2.scala @@ -0,0 +1,6 @@ +import p.A + +object B { + val a = new A // No crash with check-init + object graph extends A // <<= crach with check-init +}