-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
TypeScript Version: 2.6.0
Code
For the JS
let validLambda = () => ({
async bla() {
for ( let i of [] ) {
console.log(i)
}
}
})
Expected behavior:
No errors
Actual behavior:
The following errors are reported:
[Trace - 10:41:27] Event received: syntaxDiag (0).
Data: {
"file": "/Users/matb/projects/san/test.js",
"diagnostics": [
{
"start": {
"line": 2,
"offset": 11
},
"end": {
"line": 2,
"offset": 14
},
"text": "'=' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 2,
"offset": 17
},
"end": {
"line": 2,
"offset": 18
},
"text": "',' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 3,
"offset": 13
},
"end": {
"line": 3,
"offset": 14
},
"text": "':' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 3,
"offset": 19
},
"end": {
"line": 3,
"offset": 20
},
"text": "')' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 3,
"offset": 21
},
"end": {
"line": 3,
"offset": 23
},
"text": "'=' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 3,
"offset": 27
},
"end": {
"line": 3,
"offset": 28
},
"text": "',' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 3,
"offset": 29
},
"end": {
"line": 3,
"offset": 30
},
"text": "'=>' expected.",
"code": 1005,
"category": "error"
},
{
"start": {
"line": 6,
"offset": 5
},
"end": {
"line": 6,
"offset": 6
},
"text": "Declaration or statement expected.",
"code": 1128,
"category": "error"
},
{
"start": {
"line": 7,
"offset": 1
},
"end": {
"line": 7,
"offset": 2
},
"text": "Declaration or statement expected.",
"code": 1128,
"category": "error"
},
{
"start": {
"line": 7,
"offset": 2
},
"end": {
"line": 7,
"offset": 3
},
"text": "Declaration or statement expected.",
"code": 1128,
"category": "error"
}
]
}
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue