Wrong example - Please ignore the earlier mail. realized that this scenario is covered under local classes to flag the error. - sorry for the noise.
Regards, Manoj -----Manoj Palat/India/IBM wrote: ----- To: amber-spec-experts@openjdk.java.net From: Manoj Palat/India/IBM Date: 06/20/2020 05:00PM Subject: Sealed interfaces in qualified anonymous class instances - minor spec addition? Hi, >From jep 360 Section 15.9.1 [ >http://cr.openjdk.java.net/~gbierman/jep360/jep360-20200526/specs/sealed-classes-jls.html#jls-15.9.1] > second bullet, ie: “If the class instance creation expression is qualified, then: The Identifier in ClassOrInterfaceTypeToInstantiate must unambiguously denote an inner class that is accessible, non-final, non-sealed, not an enum type, and a member of the compile-time type of the Primary expression or the ExpressionN