diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-11-14 17:10:54 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-11-17 10:04:23 +0100 |
commit | 6a398a2d551534157f14c4bba103c3dff9b85c18 (patch) | |
tree | 3fac284ff9d3dbb9a3fc149a615971576fbd8106 /tests | |
parent | adb37eee8974be841ff5eef2655c23394c05badb (diff) | |
download | dotty-6a398a2d551534157f14c4bba103c3dff9b85c18.tar.gz dotty-6a398a2d551534157f14c4bba103c3dff9b85c18.tar.bz2 dotty-6a398a2d551534157f14c4bba103c3dff9b85c18.zip |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/i1708.scala | 2 | ||||
-rw-r--r-- | tests/neg/i1708b.scala | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/neg/i1708.scala b/tests/neg/i1708.scala new file mode 100644 index 000000000..47bc456f3 --- /dev/null +++ b/tests/neg/i1708.scala @@ -0,0 +1,2 @@ +package foo { trait identifier } +package foo { class identifier } // error 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 + } +} |