Files
sdk/pkg/compiler/test/field_analysis/kdata/optional_parameters.dart
T
Nate Biggs 545ee13cd4 [dart2js] Clean up usages of 'new' keyword.
Change-Id: I193e19581d29a9c4b343ae0a681d1ff530cfce1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281309
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-14 02:36:38 +00:00

55 lines
1.0 KiB
Dart

// Copyright (c) 2019, 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.
main() {
Class1(0);
Class1(0, 1);
Class2(0);
Class2(0, field2: 1);
}
class Class1 {
/*member: Class1.field1:
Class1.=?,
initial=NullConstant
*/
var field1;
/*member: Class1.field2:
Class1.=1:IntConstant(2),
initial=NullConstant
*/
var field2;
/*member: Class1.field3:
Class1.=2:IntConstant(3),
initial=NullConstant
*/
var field3;
Class1(this.field1, [this.field2 = 2, this.field3 = 3]);
}
class Class2 {
/*member: Class2.field1:
Class2.=?,
initial=NullConstant
*/
var field1;
/*member: Class2.field2:
Class2.=field2:IntConstant(2),
initial=NullConstant
*/
var field2;
/*member: Class2.field3:
Class2.=field3:IntConstant(3),
initial=NullConstant
*/
var field3;
Class2(this.field1, {this.field2 = 2, this.field3 = 3});
}