Files
sdk/pkg/dart2bytecode/testcases/field_initializers.dart
T
Alexander Markov 8a2deccc9a [vm,dart2bytecode] Reformat pkg/dart2bytecode and pkg/vm
Reformat these packages after the language version was bumped in
https://dart-review.googlesource.com/c/sdk/+/487942

TEST=ci

Change-Id: I6475e4b3d096b3c1f9aded34a5736989222e1689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489400
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2026-03-20 06:35:41 -07:00

29 lines
675 B
Dart

// Copyright (c) 2024, the Dart 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.
class A {
int? foo1;
int? foo2 = null;
int foo3 = 42;
int? foo4;
int foo5 = 43;
A(this.foo4) : foo5 = 44;
A.constr2(int x, int y) : foo1 = x, foo5 = y + 1;
A.redirecting1() : this(45);
A.redirecting2(int a, int b, int c) : this.constr2(a, b * c);
}
class B extends A {
int foo6 = 46;
static int foo7 = 47;
static const int foo8 = 48;
B() : super(49);
B.c2(int i, int j) : foo6 = 50, super.redirecting2(i, j, 51);
}
main() {}