author | twisti |
Wed, 11 Nov 2015 14:40:38 -1000 | |
changeset 34173 | 01bb07d23a5b |
parent 31925 | 85c87bc2f1f3 |
permissions | -rw-r--r-- |
28130
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
1 |
/* |
31925 | 2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
28130
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
31925 | 4 |
* |
28130
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
31925 | 8 |
* |
28130
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
13 |
* accompanied this code). |
31925 | 14 |
* |
28130
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
31925 | 18 |
* |
28130
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
21 |
* questions. |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
22 |
*/ |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
23 |
|
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
24 |
/** |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
25 |
* JDK-8067774: Use a stack of types when calculating local variable types |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
26 |
* |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
27 |
* @test |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
28 |
* @run |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
29 |
*/ |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
30 |
|
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
31 |
print((function (p) { |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
32 |
var a, b; |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
33 |
|
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
34 |
a = p ? ((b = 1), b) : 0; |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
35 |
|
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
36 |
return a; |
433d6755c5f8
8067774: Use a stack of types when calculating local variable types
attila
parents:
diff
changeset
|
37 |
})(true)); |