# HG changeset patch # User Andreas Woess # Date 1442919981 -7200 # Node ID 396c1d17a11a6f9def81cfb53d192be4b02ea994 # Parent cd7ee4a382e49601c6ccc287e1b52ea39c77f41f DynamicObject#define should accept null values diff -r cd7ee4a382e4 -r 396c1d17a11a truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java --- a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java Fri Sep 18 17:07:55 2015 +0200 +++ b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java Tue Sep 22 13:06:21 2015 +0200 @@ -288,7 +288,7 @@ if (existing == null) { updateShape(); oldShape = getShape(); - Shape newShape = oldShape.addProperty(Property.create(id, oldShape.allocator().locationForValue(value, true, true), flags)); + Shape newShape = oldShape.addProperty(Property.create(id, oldShape.allocator().locationForValue(value, true, value != null), flags)); updateShape(); newShape.getLastProperty().setGeneric(this, value, oldShape, newShape); } else {