c10b41a4e2
These are used to provide a testable textual representation of types and constants that do not rely upon Node.toString. Change-Id: Iff77ebb44e8299b262f4f263666b2e1d4dd5794b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147909 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
19 lines
466 B
Dart
19 lines
466 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=C.==*/ c
|
|
?. /*@target=C.f*/ f();
|
|
/*@ type=C* */ /*@target=C.==*/ c?. /*@target=C.f*/ f();
|
|
}
|
|
|
|
main() {}
|