Browse files

[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
5e71539.
  • Loading branch information...
1 parent 4f8c306 commit 61140384f628b703797ab7ccc3466ad90350abec @xeno-by xeno-by committed May 17, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/reflect/scala/reflect/runtime/JavaMirrors.scala
View
3 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)"
}

0 comments on commit 6114038

Please sign in to comment.