blob: 6bc8abba1e49cf359725896552b7886de3fcc3a6 [file] [log] [blame]
// Copyright (c) 2017, 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 inlining;
class InlineConstructorOfInner {
class Inner {
int a;
@CheckDiscardedConstructor
Inner(int a) {
this.a = a;
}
// This is not inlined, even though it is only called once, as it is only called from a
// non-constructor, and will set a field (the outer object) before calling the other
// constructor.
Inner(long a) {
this((int) a);
}
public Inner create() {
return new Inner(10L);
}
}
Inner inner;
InlineConstructorOfInner() {
inner = new Inner(10L).create();
}
}