Skip to content

optional chaining inside do() argument list #1482

@IlyaSkriblovsky

Description

@IlyaSkriblovsky

decaffeinate is crashing on my CoffeeScript input:

do (a = b?.c) ->

(repl)

I get this error:

stdin: AddVariableDeclarationsStage failed to parse: The type cast expression is expected to be wrapped with parenthesis (1:21)
> 1 | (function(a) {})(b.c : undefined));
    |                      ^
  2 | 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions