40d75d733b
Change-Id: I19a50b7d56b63c96f24daf8aaf975e0748e29cf8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116340 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
19 lines
480 B
Dart
19 lines
480 B
Dart
// Copyright (c) 2017, 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.
|
|
|
|
/*@testedFeatures=inference*/
|
|
library test;
|
|
|
|
class C {
|
|
int f() => null;
|
|
}
|
|
|
|
g(C c) {
|
|
var /*@ type=int* */ x = /*@ type=C* */ /*@target=Object::==*/ c
|
|
?. /*@target=C::f*/ f();
|
|
/*@ type=C* */ /*@target=Object::==*/ c?. /*@target=C::f*/ f();
|
|
}
|
|
|
|
main() {}
|