Files
sdk/pkg/front_end/testcases/nnbd/issue_39286.dart
T
Jens Johansen 48f0b83ff2 [CFE] Allow ! in cascade
Fixes #39286.

Change-Id: I4e7270dacf7bc43accae4d45d26146cfb7d2b1ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124330
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-11 09:44:12 +00:00

20 lines
358 B
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.
class C {
D? f() => new D();
void h() {}
}
class D {
void g() {}
}
void test(C x) {
x..f()!.g()..h();
}
main() {
test(new C());
}