Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1251

nb-javac 11 testcase failure : Compound var declaration

    XMLWordPrintableJSON

Details

    Description

      Below testcases are failing:
      [junit] Testcase: testVarCompoundDeclaration1(org.netbeans.api.java.source.gen.VarCompoundDeclarationTest): FAILED
      [junit] Testcase: testVarCompoundDeclaration2(org.netbeans.api.java.source.gen.VarCompoundDeclarationTest): FAILED
      [junit] Testcase: testVarCompoundDeclaration3(org.netbeans.api.java.source.gen.VarCompoundDeclarationTest): FAILED
      [junit] Testcase: testVarCompoundDeclaration4(org.netbeans.api.java.source.gen.VarCompoundDeclarationTest): FAILED

      [junit] Testcase: testCase1(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase2(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase3(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase5(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase6(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase7(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase8(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase9(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED
      [junit] Testcase: testCase10(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): FAILED

       

      Issue Description:

      Javac Issue description(from Vikas) :

      Sample code: var v1 = 10, v2 = 11;

      Compilation tree details with jdk-10:

      In this case the parent bloc tree has two trees : 1. int v1 = 10; 2. int v2 = 11;

      statementPath.getLeaf() i.e ctx.getPath().getLeaf() refers to first tree of block i.e int v1 = 10;

      Compilation tree details with jdk-11:

      In this case the parent bloc tree has two trees : 1. int v1 = 10; 2. var v2 = 11;

      statementPath.getLeaf() i.e ctx.getPath().getLeaf() refers to second tree of block i.e var v2 = 11;

      Attachments

        Issue Links

          Activity

            People

              vikas.prabhakar vikas kumar prabhakar
              vikas.prabhakar vikas kumar prabhakar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m