summaryrefslogtreecommitdiff
path: root/test/files/pos/t9479b.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-09-19 14:33:45 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-09-19 18:41:52 +1000
commit581e2c2455524123ed259adcfc66817f7fc04726 (patch)
tree825e083e0fe7f9ed912e199dc783c350ef96377f /test/files/pos/t9479b.scala
parent46c81c6be94152f8ecf3b9cfc27ca1bb393b46f1 (diff)
downloadscala-581e2c2455524123ed259adcfc66817f7fc04726.tar.gz
scala-581e2c2455524123ed259adcfc66817f7fc04726.tar.bz2
scala-581e2c2455524123ed259adcfc66817f7fc04726.zip
SI-9479 Fix regression w. inherited overloads in package object
One shouldn't base any decisions of the owner of an overloaded symbol. Instead, the owner of each of the alternatives should be considered. This gotcha is super easy to forget, as I did with my change to simplify the way we detect whether we need to add the `.package` prefix to a tree.
Diffstat (limited to 'test/files/pos/t9479b.scala')
-rw-r--r--test/files/pos/t9479b.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/t9479b.scala b/test/files/pos/t9479b.scala
new file mode 100644
index 0000000000..5fc795a1fd
--- /dev/null
+++ b/test/files/pos/t9479b.scala
@@ -0,0 +1,15 @@
+trait Predefs {
+ def bridge(p: String): Unit = ???
+ def bridge(p: Any): Unit = ???
+}
+
+package object molecule extends Predefs
+
+package molecule {
+ package process {
+ class Test {
+ def main(): Unit = molecule.bridge(null, null)
+ }
+ }
+}
+