equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 |
23 |
24 /** |
24 /** |
25 * @test |
25 * @test |
26 * @bug 8214031 |
26 * @bug 8214031 |
27 * @summary Verify that definite assignment when true works (legal code) |
27 * @summary Verify that definite assignment when true works (legal code) |
28 * @compile --enable-preview --source 13 DefiniteAssignment1.java |
28 * @compile --enable-preview --source ${jdk.version} DefiniteAssignment1.java |
29 * @run main/othervm --enable-preview DefiniteAssignment1 |
29 * @run main/othervm --enable-preview DefiniteAssignment1 |
30 */ |
30 */ |
31 public class DefiniteAssignment1 { |
31 public class DefiniteAssignment1 { |
32 public static void main(String[] args) { |
32 public static void main(String[] args) { |
33 int a = 0; |
33 int a = 0; |