DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.33k stars 28 forks source link

hoistDec bug #1267

Closed edemaine closed 1 month ago

edemaine commented 1 month ago

The following code fails to compile, with error Couldn't find block to hoist declaration into.:

  switch type
    when "Declaration"
      [
        if exp.bindings?.#
          [exp.bindings.-1]
        else
          []
      ]