You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=====================================
Conditional access expression with simple member access
=====================================
if ((p as Person[])?[0]._Age != 1) { }
---
(compilation_unit
(global_statement
(if_statement
(binary_expression
(member_access_expression
(conditional_access_expression
(parenthesized_expression
(as_expression (identifier) (array_type (identifier) (array_rank_specifier))))
(element_binding_expression
(bracketed_argument_list (argument (integer_literal)))))
(identifier))
(integer_literal))
(block))))
Actual: The member_access_expression evaluates .Age on a conditional_access_expression, whose value is possibly null.
Expected: The evaluation of .Age is only performed if (p as Person[]) is not null. The member_access_expression should be inside the conditional_access_expression.
The text was updated successfully, but these errors were encountered:
The test in expressions.txt is incorrect:
Actual: The
member_access_expression
evaluates.Age
on aconditional_access_expression
, whose value is possibly null.Expected: The evaluation of
.Age
is only performed if(p as Person[])
is not null. Themember_access_expression
should be inside theconditional_access_expression
.The text was updated successfully, but these errors were encountered: