summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index 9f22bc54f7..85ed3a786f 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -1238,7 +1238,7 @@ trait Symbols {
// appears to succeed but highly opaque errors come later: see bug #1286
if (res == false) {
val (f1, f2) = (this.sourceFile, that.sourceFile)
- if (f1 != null && f2 != null && f1 != f2)
+ if (f1 != null && f2 != null && f1.path != f2.path)
throw FatalError("Companions '" + this + "' and '" + that + "' must be defined in same file.")
}