blob: 70830fac389420e06fd9e2f53f2931bbe7d0a237 [file] [log] [blame]
// Copyright (c) 2015, 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.
/**
* @assertion Evaluation of a conditional property extraction expression e of
* the form e1?.id is equivalent to the evaluation of the expression
* ((x) => x == null?null : x.id)(e1). The static type of e is the same as the
* static type of e1.id.
* @description Check that static type of the e?.id is the same as e.id. Test
* method
* @static-clean
* @author sgrekhov@unipro.ru
*/
class C {
int m() => 1;
}
main() {
var c = new C() as C?;
Function? x = c?.m;
}