Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Block comments push last comment into import statements #5386

Open
n-smits opened this issue Nov 17, 2021 · 0 comments
Open

Bug: Block comments push last comment into import statements #5386

n-smits opened this issue Nov 17, 2021 · 0 comments

Comments

@n-smits
Copy link

n-smits commented Nov 17, 2021

### if there is a block comment before imports ###
log 'including if there are lines in between'
# last comment before import statement is moved into import
import { a } from 'foo'

Last 2 lines will compile to invalid Javascript:

import {
  // last comment before import statement is moved into import
  a
} from 'foo';

Here are some permutations:

Ok:

# line
import { a } from 'foo'
### block ###
### block ###
import { a } from 'foo'

Fail:

import { a } from 'foo'
### block pushed inside ###
# line pushed inside
import { b } from 'foo'
### block NOT pushed inside ###
# line pushed inside
import { a } from 'foo'
  • CoffeeScript version: 2.6.1
  • Node.js version: 6.13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant