Skip to content

Bug: when using (b=1; return) if true followed by any statement #5013

@rosenfeld

Description

@rosenfeld

Choose one: is this a bug report or feature request? Bug

Input Code

a = ->
  (b=1; return) if true
  #b=2

The code above compiles successfully in the last release, but if you uncomment the last line then it throws "error: cannot use a pure statement in an expression". This used to work but after upgrading to latest CoffeeScript my existing code is broken. Was this change intentional?

  • CoffeeScript version: 2.2.3
  • Node.js version: 8.9.1

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions