Просмотр исходного кода

291206: declare error/warning with type patterns

tags/V1_6_9M1
aclement 14 лет назад
Родитель
Сommit
9241e2ec7a
3 измененных файлов: 47 добавлений и 0 удалений
  1. 17
    0
      tests/bugs169/pr291206/One.java
  2. 15
    0
      tests/bugs169/pr291206/Three.java
  3. 15
    0
      tests/bugs169/pr291206/Two.java

+ 17
- 0
tests/bugs169/pr291206/One.java Просмотреть файл

@@ -0,0 +1,17 @@
import java.lang.annotation.*;

aspect X {
declare warning: @Anno *: "Nothing should be annotated Anno!";
}

@Anno
class C {
}

class D {
}

@Retention(RetentionPolicy.RUNTIME)
@interface Anno {}

+ 15
- 0
tests/bugs169/pr291206/Three.java Просмотреть файл

@@ -0,0 +1,15 @@
import java.lang.annotation.*;

aspect X {
declare error: I+ && !hasmethod(* foo(..)): "Missing foo() method in I subtype";
}

interface I {}

class C implements I {
void foo() {}
}

class D implements I {
}

+ 15
- 0
tests/bugs169/pr291206/Two.java Просмотреть файл

@@ -0,0 +1,15 @@
import java.lang.annotation.*;

aspect X {
declare warning: I+ && !hasmethod(* foo(..)): "Missing foo() method in I subtype";
}

interface I {}

class C implements I {
void foo() {}
}

class D implements I {
}

Загрузка…
Отмена
Сохранить