Index: test/mjsunit/arguments.js |
diff --git a/test/mjsunit/arguments.js b/test/mjsunit/arguments.js |
index 97ec7cca6d9c51595f118d0ab9ab9b34e777e465..8cdc0608e7d86578a56902a852f8470fa72ce338 100644 |
--- a/test/mjsunit/arguments.js |
+++ b/test/mjsunit/arguments.js |
@@ -271,3 +271,17 @@ assertEquals(117, arg_set(0xFFFFFFFF)); |
assertEquals(undefined, args[key]); |
assertEquals(2, args.length); |
})(); |
+ |
+(function testSloppyArgumentsLengthMapChange() { |
+ function f(a) { return arguments }; |
+ let args1 = f(1); |
+ let args2 = f(1,2); |
+ assertTrue(%HaveSameMap(args1, args2)); |
+ // Changing the length type doesn't causes a map transition. |
+ args2.length = 12; |
+ assertTrue(%HaveSameMap(args1, args2)); |
+ args2.length = 12.0; |
+ assertTrue(%HaveSameMap(args1, args2)); |
+ args2.length = "aa" |
+ assertTrue(%HaveSameMap(args1, args2)); |
+})(); |