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

Duplication of labels not detected

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Labels with the same name in the same scope are accepted when specified on
      statements that are not blocks, contrary to Language Specification Sect. 14.7.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the file below.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      An error detected.
      ACTUAL -
      No errors detected.

      ---------- BEGIN SOURCE ----------
      public class ErrLabels {
          static void meth(){
             lab: ;
             lab: return;
          }
      }
      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: