Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 61140384f628b703797ab7ccc3466ad90350abec 1 parent 4f8c306
Eugene Burmako xeno-by authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/reflect/scala/reflect/runtime/JavaMirrors.scala
3  src/reflect/scala/reflect/runtime/JavaMirrors.scala
View
@@ -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)"
}
Please sign in to comment.
Something went wrong with that request. Please try again.