Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8332504

Annotation processor crashes with module import

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      A DESCRIPTION OF THE PROBLEM :
      visitModuleImport in com.sun.tools.javac.tree.TreeScanner has not been overriden, so defaulted to Visitor::visitModuleImport, which forwards to Visitor::visitTree, which is also not overriden, and, therefore, threw AssertionError.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile code with module import in it

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      normal compilation
      ACTUAL -
      internal compiler error (AssertionError is thrown)

      ---------- BEGIN SOURCE ----------
      package io.avaje.modules.example;

      import module java.base;

      import java.util.List;

      public class Main {

        public static void main(String[] args) {

          List.of();

        }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              tongwan Andrew Wang
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: