Double-semicolon in import statements

Jeremy Manson jeremymanson at
Thu Aug 1 10:12:33 PDT 2013

Hi folks,

Another one that came up was that javac allows an empty statement between
import statements.  This doesn't *seem* to be allowed by the JLS's grammar
(JLS 7.5), so it should probably either be clarified in the JLS or fixed.

import java.util.HashMap;;

public class Semicolon {
  public static void main(String[] args) {
     System.out.println("This program should not compile");


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the compiler-dev mailing list