48f0b83ff2
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>
20 lines
358 B
Dart
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());
|
|
} |