-
-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
Description
The following piece of code is valid but it is parsed incorrectly:
The random parsing seems to be a combination of export, static class initialization block and comments.
export class Incorrect {
static {
this.foo = true
this.bar = false
this.hello = 1
this.init()
}
}
export class Incorrect {
static {
this.foo= true
this.bar = false
this.init()
this.hello = 1
}
}
export class Correct {
static {
this.foo= true
this.bar = false
this.init()
this.hello = 1
}
}
export class Incorrect {
static {
// This comment affects parsing
this.foo= true
this.bar = false
this.init()
this.hello = 1
}
}
// This comment affects parsing
export class Incorrect {
static {
this.foo= true
this.bar = false
this.init()
this.hello = 1
}
}Functions call only
export class Incorrect {
static {
this.init()
this.init()
this.init()
}
}
export class Incorrect {
static {
this.init()
this.init()
this.init()
}
}
export class Incorrect {
static {
// This comment affects parsing
this.init()
this.init()
this.init()
}
}
// This comment does not affects parsing (which is already incorrect)
export class Incorrect {
static {
this.init()
this.init()
this.init()
}
}Functions call only no export
class Incorrect {
static {
this.init()
this.init()
this.init()
}
}
class Correct {
static {
this.init()
this.init()
this.init()
}
}
class Incorrect {
static {
// This comment does not affects parsing (which is already incorrect)
this.init()
this.init()
this.init()
}
}
// This comment does not affects parsing (which is already incorrect)
class Incorrect {
static {
this.init()
this.init()
this.init()
}
}