blob: 504db6cc51984ae0e1b1f0f8a00fe1e2e2a4b2fb [file] [log] [blame]
Søren Gjessef1e2fc92017-08-29 14:13:12 +02001// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5public class ClassInitializerMixedInitialization {
6
7 static boolean b;
8 static int x = 1;
9 static int y;
10
11 static {
12 x = 2;
13 if (b) {
14 y = 1;
15 } else {
16 y = 2;
17 }
18 x = 3;
19 }
20
21 public static void main(String[] args) {
22 System.out.println("x=" + x);
23 System.out.println("y=" + y);
24 }
25}