This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267604

Summary: AssertionError at com.oracle.js.parser.Parser.classTail
Product: javascript Reporter: Jenselme
Component: EditorAssignee: Petr Hejl <phejl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 225791
Attachments: stacktrace

Description Jenselme 2016-08-16 14:23:01 UTC
Build: NetBeans IDE Dev (Build 201608140002)
VM: OpenJDK 64-Bit Server VM, 25.101-b14, OpenJDK Runtime Environment, 1.8.0_101-b14
OS: Linux

User Comments:
Jenselme: This happens when an attribute has the same name as a getter. The expection happens every few seconds. To reproduce, use the code below:

class Test {
    toto;

    get toto() {

    }
}




Stacktrace: 
java.lang.AssertionError
   at com.oracle.js.parser.Parser.classTail(Parser.java:1339)
   at com.oracle.js.parser.Parser.classExpression(Parser.java:1213)
   at com.oracle.js.parser.Parser.classDeclaration(Parser.java:1187)
   at com.oracle.js.parser.Parser.statement(Parser.java:1134)
   at com.oracle.js.parser.Parser.sourceElements(Parser.java:932)
   at com.oracle.js.parser.Parser.program(Parser.java:867)
Comment 1 Jenselme 2016-08-16 14:23:05 UTC
Created attachment 161679 [details]
stacktrace
Comment 2 Petr Pisl 2016-08-17 12:03:50 UTC
Petr, could you look at this? I can reproduce it. Thanks