From bce484e2371b9a264565fc5e1cac2815bed8d79b Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Sun, 16 Jan 2011 19:10:44 +0000 Subject: Do not redefine the symbol in a class file to p... Do not redefine the symbol in a class file to prevent spurious errors in IDE. IDE creates a second copy in owner scope and unlinks it when finished. Review by odersky --- src/compiler/scala/tools/nsc/interactive/Global.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index a563b25f44..a816413295 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -656,7 +656,7 @@ self => * Since the IDE rechecks units several times in the same run, these tests * are disabled by always returning true here. */ - override def canRedefine(sym: Symbol) = true + override def canRedefine(sym: Symbol) = sym.sourceFile ne null def typeCheck(unit: CompilationUnit): Unit = { activeLocks = 0 -- cgit v1.2.3