summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-05-17 12:53:41 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-05-17 12:53:41 +0200
commit61140384f628b703797ab7ccc3466ad90350abec (patch)
tree710b99b185d385676cc3ff4eea9beca1d5e3efce /src
parent4f8c306aca703c63282295c9f74f0cb35f9f85d4 (diff)
downloadscala-61140384f628b703797ab7ccc3466ad90350abec.tar.gz
scala-61140384f628b703797ab7ccc3466ad90350abec.tar.bz2
scala-61140384f628b703797ab7ccc3466ad90350abec.zip
[nomaster] unbreaks test.bc
The optimizer behaves unexpectedly smartly, stripping off unused private methods. Unfortunately, sometimes private methods might be compiled down to public Java methods, so stripping them off might lead to binary incompatibilities. This particular commit recovers from this problem caused by https://github.com/scala/scala/commit/5e715396af.
Diffstat (limited to 'src')
-rw-r--r--src/reflect/scala/reflect/runtime/JavaMirrors.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/runtime/JavaMirrors.scala b/src/reflect/scala/reflect/runtime/JavaMirrors.scala
index 09b07bb2c7..ed4458c455 100644
--- a/src/reflect/scala/reflect/runtime/JavaMirrors.scala
+++ b/src/reflect/scala/reflect/runtime/JavaMirrors.scala
@@ -287,6 +287,9 @@ private[reflect] trait JavaMirrors extends internal.SymbolTable with api.JavaUni
// if (!symbol.isMutable) ErrorSetImmutableField(symbol)
jfield.set(receiver, value)
}
+ // this dummy method is necessary to prevent the optimizer from stripping off ErrorSetImmutableField
+ // which would break binary compatibility with 2.10.0
+ private def dummy(symbol: Symbol) = ErrorSetImmutableField(symbol)
override def toString = s"field mirror for ${symbol.fullName} (bound to $receiver)"
}