diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-10-26 16:43:36 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-10-26 20:54:55 +0200 |
commit | bd1858896f6546d778aa93c39b491ed5e2d7e0b3 (patch) | |
tree | 2d14a1933d38e253a38c18304c1d4c252a5cbd8f /test | |
parent | eff0aabb7824513498a4081072845001dbe4897f (diff) | |
download | scala-bd1858896f6546d778aa93c39b491ed5e2d7e0b3.tar.gz scala-bd1858896f6546d778aa93c39b491ed5e2d7e0b3.tar.bz2 scala-bd1858896f6546d778aa93c39b491ed5e2d7e0b3.zip |
Ensure companionClass returns a class, not a type alias
This fixes scala/scala-dev#248, where a type alias reached the backend
through this method.
This is very similar to the fix for SI-5031, which changed it only in
ModuleSymbol, but not in Symbol.
The override in ModuleSymbol is actually unnecessary (it's identical),
so it's removed in this commit. It was added for unclear reasons in
296b706.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/sd248/Prop_1.scala | 2 | ||||
-rw-r--r-- | test/files/pos/sd248/Test_2.scala | 5 | ||||
-rw-r--r-- | test/files/pos/sd248/package_1.scala | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/sd248/Prop_1.scala b/test/files/pos/sd248/Prop_1.scala new file mode 100644 index 0000000000..d5decda547 --- /dev/null +++ b/test/files/pos/sd248/Prop_1.scala @@ -0,0 +1,2 @@ +package p +object Prop { class Whitelist } diff --git a/test/files/pos/sd248/Test_2.scala b/test/files/pos/sd248/Test_2.scala new file mode 100644 index 0000000000..602e6d37b5 --- /dev/null +++ b/test/files/pos/sd248/Test_2.scala @@ -0,0 +1,5 @@ +package p + +object PropTest { + def t = new Prop.Whitelist +} diff --git a/test/files/pos/sd248/package_1.scala b/test/files/pos/sd248/package_1.scala new file mode 100644 index 0000000000..a90354e66f --- /dev/null +++ b/test/files/pos/sd248/package_1.scala @@ -0,0 +1,3 @@ +package object p { + type Prop = String +} |