| // Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| package instancevariable; |
| public InstanceVariable parent; |
| private int privateBar = -1; |
| private InstanceVariable privateParent; |
| public InstanceVariable() {} |
| public InstanceVariable(int bar) { |
| parent = new InstanceVariable(); |
| privateParent = new InstanceVariable(); |
| return privateFoo + privateBar + bar + foo + parent.foo + privateParent.privateBar; |
| public static void main(String[] args) { |
| InstanceVariable instanceVariable = new InstanceVariable(17); |
| System.out.println(instanceVariable.sumAll() + "=144"); |