NASHORN-177.js revision 6:5a1b0714df0e
1178476Sjb/*
2178476Sjb * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3178476Sjb * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4178476Sjb *
5178476Sjb * This code is free software; you can redistribute it and/or modify it
6178476Sjb * under the terms of the GNU General Public License version 2 only, as
7178476Sjb * published by the Free Software Foundation.
8178476Sjb *
9178476Sjb * This code is distributed in the hope that it will be useful, but WITHOUT
10178476Sjb * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11178476Sjb * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12178476Sjb * version 2 for more details (a copy is included in the LICENSE file that
13178476Sjb * accompanied this code).
14178476Sjb *
15178476Sjb * You should have received a copy of the GNU General Public License version
16178476Sjb * 2 along with this work; if not, write to the Free Software Foundation,
17178476Sjb * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18178476Sjb *
19178476Sjb * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20178476Sjb * or visit www.oracle.com if you need additional information or have any
21178476Sjb * questions.
22178476Sjb */
23178476Sjb
24178476Sjb/**
25178476Sjb * NASHORN-177 : null array elements become undefined on assignment
26178476Sjb *
27178476Sjb * @test
28178476Sjb * @run
29178476Sjb */
30178476Sjb
31178476Sjbvar n=[null];
32178476Sjbprint(n[0]);
33178476Sjb
34178476Sjbvar u=[];
35178476Sjbu[0] = n[0];
36178476Sjbprint(u[0]);
37178476Sjb
38178476Sjb