From 7021570065a8932462a62265dd29a9ff01c9051a Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Sat, 28 Mar 2015 20:34:53 +0100 Subject: Guard against absent symbols in synthesizeCompanionMethod. --- src/dotty/tools/dotc/core/Symbols.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Symbols.scala') diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index ed59a054d..5a856dd06 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -162,7 +162,7 @@ trait Symbols { this: Context => privateWithin, coord, assocFile) def synthesizeCompanionMethod(name: TermName, ret: SymDenotation, owner: SymDenotation)(implicit ctx: Context) = { - if(owner.exists && ret.exists) ctx.newSymbol( + if(owner.exists && ret.exists && !owner.isAbsent && !ret.isAbsent) ctx.newSymbol( owner = owner.symbol, name = name, flags = Flags.Synthetic | Flags.Private, -- cgit v1.2.3