Boxing1.java revision 553
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4869233 4872709 4868735 4921949 4921209 4965701 4934916 4975565 4974939
* @author gafter
*/
public class Boxing1 {
static char _char = _Character;
_Integer = 2;
_int = 12;
_Integer = 8;
_int = 9;
_Character = 'a';
/* assignment operators don't work; see 4921209 */
Integer i = 0;
i = i + 2;
i += 2;
if (i != 4) throw new Error();
int j = 0;
j += i;
if (j != 4) throw new Error();
a[0] = 3;
a[0] += 3;
x.next = y;
x.next.i = 4;
x.next.i += 4;
boxIndex();
boxArray();
}
static void boxIndex() {
Integer i = 0;
}
static void boxArray() {
for (int i : a2)
}
static class Froobie {
Integer i = 1;
}
static class Scott {
Integer i[];
Integer j[];
Integer k;
int q = i[j[k]]++;
}
class T4974939 {
void f() {
Byte b = 12;
Byte c = 'a';
Short s = 'b';
Short t = 12;
Character d = 12;
}
}
}