mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
Before this if class is final we assumed that all its instances are exact instances; however if it's also abstract, we assumed that exact instances cannot be instantiated (which is technically correct). Thus we could not create TypeConstraint for such a type at all (which is also technically correct). However, clients may not expect the bottom constraint, so we decide now to ignore abstract modifier in such a case to be able to continue the analysis. GitOrigin-RevId: 04c9eafd7574154ea6389028a82b24ce735d6a49
9 lines
227 B
Java
9 lines
227 B
Java
import java.util.Optional;
|
|
|
|
class AAA {
|
|
<error descr="Modifier 'abstract' not allowed here">abstract</error> enum X {A, B;}
|
|
|
|
public static void main(String[] args) {
|
|
Optional.of(args.length > 0 ? X.A : X.B).get();
|
|
}
|
|
} |