Language-tools: Incorrect semicolon error before dollar label

Created on 7 Jul 2020  路  2Comments  路  Source: sveltejs/language-tools

Describe the bug
The svelte extension raises error of ';' expected before the dollar label even if it's valid syntax. Inserting the semicolon before it did solve the issue, however the semicolon should be optional.

To Reproduce
Steps to reproduce the behavior:

<script>
  let foo = 'bar'

  $: console.log(foo)
</script>

Expected behavior
No error raised.

Screenshots
The code above as in VSCode shows error:
image

System (please complete the following information):

  • OS: Ubuntu
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Additional context
Issue appears in v101.0.0, but works fine in the previous version v100.1.0

Fixed bug

Most helpful comment

yeah forgot to put a semi before the wrapping arrow function

All 2 comments

@jasonlyu123 possibly an error introduced in #259 ?

yeah forgot to put a semi before the wrapping arrow function

Was this page helpful?
0 / 5 - 0 ratings