fork download
  1.  
  2. import java.util.ArrayList;
  3. import java.util.function.Predicate;
  4.  
  5. class Ideone {
  6. public static void main(String[] args) {
  7. System.out.println("Hello, world!");
  8. }
  9. }
  10.  
  11. @interface EveryWhere{}
  12.  
  13. @EveryWhere class AnnotedEveryWhere<@EveryWhere T> extends @EveryWhere Object{
  14. @EveryWhere int i = 0;
  15. @EveryWhere <@EveryWhere T> String method(@EveryWhere ArrayList<@EveryWhere String> array) {
  16. @EveryWhere Predicate<@EveryWhere ArrayList<@EveryWhere String>> pred =
  17. (@EveryWhere ArrayList<@EveryWhere String> lambdaParameter)->{
  18. @EveryWhere ArrayList<@EveryWhere String> insideLambda = new @EveryWhere ArrayList<@EveryWhere String>();
  19. return (@EveryWhere boolean) true;};
  20. return (@EveryWhere String) "String";
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:13: error: annotation @EveryWhere not applicable in this type context
@EveryWhere class  AnnotedEveryWhere<@EveryWhere T> extends @EveryWhere Object{
                                     ^
Main.java:13: error: annotation @EveryWhere not applicable in this type context
@EveryWhere class  AnnotedEveryWhere<@EveryWhere T> extends @EveryWhere Object{
                                                            ^
Main.java:15: error: annotation @EveryWhere not applicable in this type context
  @EveryWhere <@EveryWhere T> String method(@EveryWhere ArrayList<@EveryWhere String> array) {
               ^
Main.java:15: error: annotation @EveryWhere not applicable in this type context
  @EveryWhere <@EveryWhere T> String method(@EveryWhere ArrayList<@EveryWhere String> array) {
                                                                  ^
Main.java:16: error: annotation @EveryWhere not applicable in this type context
    @EveryWhere Predicate<@EveryWhere ArrayList<@EveryWhere String>> pred =
                          ^
Main.java:16: error: annotation @EveryWhere not applicable in this type context
    @EveryWhere Predicate<@EveryWhere ArrayList<@EveryWhere String>> pred =
                                                ^
Main.java:18: error: annotation @EveryWhere not applicable in this type context
          @EveryWhere ArrayList<@EveryWhere String> insideLambda = new @EveryWhere ArrayList<@EveryWhere String>();
                                ^
Main.java:18: error: annotation @EveryWhere not applicable in this type context
          @EveryWhere ArrayList<@EveryWhere String> insideLambda = new @EveryWhere ArrayList<@EveryWhere String>();
                                                                       ^
Main.java:18: error: annotation @EveryWhere not applicable in this type context
          @EveryWhere ArrayList<@EveryWhere String> insideLambda = new @EveryWhere ArrayList<@EveryWhere String>();
                                                                                             ^
Main.java:19: error: annotation @EveryWhere not applicable in this type context
          return (@EveryWhere boolean) true;};
                  ^
Main.java:17: error: annotation @EveryWhere not applicable in this type context
        (@EveryWhere ArrayList<@EveryWhere String> lambdaParameter)->{
                               ^
Main.java:20: error: annotation @EveryWhere not applicable in this type context
    return (@EveryWhere String) "String";
            ^
12 errors
stdout
Standard output is empty