summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Vigdorchik <eugenevigdorchik@epfl.ch>2011-01-16 19:10:44 +0000
committerEugene Vigdorchik <eugenevigdorchik@epfl.ch>2011-01-16 19:10:44 +0000
commitbce484e2371b9a264565fc5e1cac2815bed8d79b (patch)
tree813c6dfde78e95ecbd4dce781a170acf8e7caebb /src
parente89b53d7e1f0ec376bd237fbaa8d7a19928e020e (diff)
downloadscala-bce484e2371b9a264565fc5e1cac2815bed8d79b.tar.gz
scala-bce484e2371b9a264565fc5e1cac2815bed8d79b.tar.bz2
scala-bce484e2371b9a264565fc5e1cac2815bed8d79b.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala2
1 files changed, 1 insertions, 1 deletions
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