blob: 093a2ac0ca33e298a6b1a21b09d5f0a35cabfc0c [file] [log] [blame]
Stephan Herhut7fa3d1b2017-08-04 13:30:15 +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.
4package inlining;
5
6public class InlineConstructorFinalField {
7
8 public final int number;
9
10 @CheckDiscarded
11 InlineConstructorFinalField(int value) {
12 number = value;
13 }
14
15 // This will not be inlined, as it sets a final field.
16 InlineConstructorFinalField() {
17 this(42);
18 }
19
20 public String toString() {
21 return "value: " + number;
22 }
23}