From 6a398a2d551534157f14c4bba103c3dff9b85c18 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Mon, 14 Nov 2016 17:10:54 +0100 Subject: Unlink type when entering clashing package Here we unlink the existing type that clashes with the package to be entered into the symbol table, issue an error and the proceed to enter the rest of the symbols. My concern with this approach is what happens during typechecking if other things reference the unlinked type. --- tests/neg/i1708b.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/neg/i1708b.scala (limited to 'tests/neg/i1708b.scala') diff --git a/tests/neg/i1708b.scala b/tests/neg/i1708b.scala new file mode 100644 index 000000000..9bcf1864d --- /dev/null +++ b/tests/neg/i1708b.scala @@ -0,0 +1,10 @@ +package foo { + trait id { + def bar: Int + } +} +package foo { + package id { // error + class Bar + } +} -- cgit v1.2.3