changeset 22198:0e5aa5fd5060

fix implicit int-to-long cast issue
author Andreas Woess <andreas.woess@oracle.com>
date Tue, 22 Sep 2015 16:46:09 +0200
parents c8f4168061ea
children e3aef4c65ea1
files truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/LayoutImpl.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/LayoutImpl.java	Fri Sep 25 16:19:41 2015 +0200
+++ b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/LayoutImpl.java	Tue Sep 22 16:46:09 2015 +0200
@@ -135,7 +135,7 @@
             newLocation = oldLocation;
         } else if (oldLocation instanceof DoubleLocation && (value instanceof Double || this.isAllowedIntToDouble() && value instanceof Integer)) {
             newLocation = oldLocation;
-        } else if (oldLocation instanceof LongLocation && (value instanceof Long || this.isAllowedIntToLong() && value instanceof Long)) {
+        } else if (oldLocation instanceof LongLocation && (value instanceof Long || this.isAllowedIntToLong() && value instanceof Integer)) {
             newLocation = oldLocation;
         } else if (oldLocation instanceof DeclaredLocation) {
             return oldShape.allocator().locationForValue(value, EnumSet.of(LocationModifier.Final, LocationModifier.NonNull));