attila@973: /* attila@973: * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. attila@973: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. attila@973: * attila@973: * This code is free software; you can redistribute it and/or modify it attila@973: * under the terms of the GNU General Public License version 2 only, as attila@973: * published by the Free Software Foundation. attila@973: * attila@973: * This code is distributed in the hope that it will be useful, but WITHOUT attila@973: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or attila@973: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License attila@973: * version 2 for more details (a copy is included in the LICENSE file that attila@973: * accompanied this code). attila@973: * attila@973: * You should have received a copy of the GNU General Public License version attila@973: * 2 along with this work; if not, write to the Free Software Foundation, attila@973: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. attila@973: * attila@973: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA attila@973: * or visit www.oracle.com if you need additional information or have any attila@973: * questions. attila@973: */ attila@973: attila@973: /** attila@973: * JDK-8055870: iteration fails if index var is not used attila@973: * attila@973: * @test attila@973: * @run attila@973: */ attila@973: attila@973: function isEmpty2(v) { attila@973: for (var k in v) { attila@973: return false; attila@973: } attila@973: return true; attila@973: } attila@973: attila@973: x = {test: 'test'} attila@973: attila@973: print(isEmpty2(x)) attila@973: