From 9553571634a0fdc6e642565e5dcc52460344b9b6 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Mon, 1 Jul 2019 08:16:09 +0200 Subject: [PATCH 1/2] Fix #6225: add test --- tests/neg/i6225.scala | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/neg/i6225.scala diff --git a/tests/neg/i6225.scala b/tests/neg/i6225.scala new file mode 100644 index 000000000000..6602f8ec928f --- /dev/null +++ b/tests/neg/i6225.scala @@ -0,0 +1,23 @@ +object O1 { + type A[X] = X + opaque type T = A +} + +object O2 { + opaque type A[X] = X + object A { + opaque type T = A + } +} + +object O3 { + opaque type R[X] = R[X] // error +} + +object O4{ + opaque type T[X] = Any +} + +object O5{ + opaque type T[X] = Nothing +} \ No newline at end of file From 059da735a6989d337087ea20cd3f4d1e0aa58150 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Mon, 1 Jul 2019 08:20:32 +0200 Subject: [PATCH 2/2] Fix #6224: add test --- tests/pos/i6224.scala | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/pos/i6224.scala diff --git a/tests/pos/i6224.scala b/tests/pos/i6224.scala new file mode 100644 index 000000000000..e7b24dfaa2e3 --- /dev/null +++ b/tests/pos/i6224.scala @@ -0,0 +1,6 @@ +object O { + opaque type T = Int + object T { + opaque type T = Int + } +}