diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-12-02 16:13:57 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-12-12 15:06:22 +0100 |
commit | e6cee2627555f379ef6cd8cd554a1079a7e074aa (patch) | |
tree | 3f9387297af328e26663150dd68950007a84eb46 /src/compiler | |
parent | a443bae8392b934bf379b3580fd01c88ed8014c2 (diff) | |
download | scala-e6cee2627555f379ef6cd8cd554a1079a7e074aa.tar.gz scala-e6cee2627555f379ef6cd8cd554a1079a7e074aa.tar.bz2 scala-e6cee2627555f379ef6cd8cd554a1079a7e074aa.zip |
SI-8024 Fix inaccurate message on overloaded ambiguous ident
`Symbol#owner` of an overloaded symbol doesn't necessarily correspond
to the owner of any of the alternatives, and as such it shouldn't
be used in error message.
neg/t8024.scala actually represents a progression since 2.10.3;
the ambiguity was not reported. I bisected the change to
https://github.com/scala/scala/pull/1554.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 2be6d92ed0..9702f49fc3 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -1108,7 +1108,7 @@ trait Contexts { self: Analyzer => impSym = NoSymbol // Otherwise they are irreconcilably ambiguous else - return ambiguousDefnAndImport(defSym.owner, imp1) + return ambiguousDefnAndImport(defSym.alternatives.head.owner, imp1) } // At this point only one or the other of defSym and impSym might be set. |