jashkenas/coffeescript

Bug: Poor error message for invalid use of `then` keyword

STRd6 opened this issue · 2 comments

STRd6 commented

Input Code

then

Expected Behavior

[stdin]:1:1: error: unexpected then
then
^^^^

Current Behavior

TypeError: Cannot read properties of undefined (reading '2')

Context

This is very minor but thought I'd point it out.

https://coffeescript.org/#try:then

  • CoffeeScript version: 2.7.1

then is a CoffeeScript keyword, that can only be used in particular places.

Oh sorry I just realized that the issue was that the error message was incorrect. Yes, that should be fixed.