Files
sdk/pkg/front_end/testcases/late_lowering/issue40373b.dart
T
Johnni Winther b978cb1cb5 [cfe] Support inference of lowered late field types
Closes #40373

Change-Id: Iddccbbafabe457fc8391dec8927a0e4fb3f6649b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134523
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-02-07 09:44:05 +00:00

30 lines
604 B
Dart

// Copyright (c) 2020, 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.
late final g;
class C {
static late final s;
late final v;
}
main() {
late final l;
g = "Lily";
C.s = "was";
var c = new C();
c.v = "here";
l = "Run, Forrest, run";
expect("Lily", g);
expect("was", C.s);
expect("here", c.v);
expect("Run, Forrest, run", l);
}
expect(expected, actual) {
if (expected != actual) throw 'Expected $expected, actual $actual';
}