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

IFII declared just after a require instruction without semicolon at the end leads to syntax error #1216

Closed
chisNaN opened this issue Oct 16, 2018 · 3 comments

Comments

@chisNaN
Copy link

commented Oct 16, 2018

What version of standard?
any
What operating system, Node.js, and npm version?
any
What did you expect to happen?
no syntax error
What actually happened?
syntax error

@chisNaN chisNaN changed the title IFII declare after a require instruction with no semicolon at the end leads to syntax error IFII declared just after a require instruction without semicolon at the end leads to syntax error Oct 16, 2018

@LinusU

This comment has been minimized.

Copy link
Member

commented Oct 16, 2018

Standard accepts the following:

const foo = require('foo')

;(function () {
  foo.bar('Hello, World!')
}())

Out of curiosity though, why are you using IFII? With the scoping rules that let and const brings they can usually be replaced with just a regular closure.

I would be happy to take a look if you could post some code ☺️

@chisNaN

This comment has been minimized.

Copy link
Author

commented Oct 17, 2018

Anything to worry about,
It was on a swift test code and was wondering how i could
in the same time not having standards complaining about semicolon
and not error syntax
thanks

@stale

This comment has been minimized.

Copy link

commented Jan 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 16, 2019

@stale stale bot closed this Jan 24, 2019

@lock lock bot locked as resolved and limited conversation to collaborators Apr 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.