File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -655,9 +655,14 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
655655 ( call_expr callee: { callee} argument: { args} argument: ( argument value: { tc} ) )
656656 ) ,
657657 rule!(
658- ( functionCallExpr calledExpression: @callee arguments: _* @args)
658+ ( functionCallExpr calledExpression: @@rawCallee arguments: _* @args)
659659 =>
660660 expr {
661+ // Always translate the callee in non-pattern context.
662+ let callee = ctx. scoped( |ctx| {
663+ ctx. in_pattern = false ;
664+ ctx. translate( rawCallee)
665+ } ) ?;
661666 if ctx. in_pattern {
662667 tree!( ( constructor_pattern constructor: { callee} element: { args} ) )
663668 } else {
Original file line number Diff line number Diff line change @@ -210,10 +210,8 @@ top_level
210210 constructor:
211211 member_access_expr
212212 base:
213- expr_equality_pattern <-- ERROR: The field member_access_expr.base should contain expr_or_type, but got expr_equality_pattern
214- expr:
215- name_expr
216- identifier: identifier "Type"
213+ name_expr
214+ identifier: identifier "Type"
217215 member: identifier "some"
218216 element:
219217 pattern_element
You can’t perform that action at this time.
0 commit comments