Selaa lähdekoodia

testcode for 121575

tags/POST_MEMORY_CHANGES
aclement 18 vuotta sitten
vanhempi
commit
f9b9ad79f2

+ 32
- 0
tests/bugs150/pr121575.aj Näytä tiedosto

@@ -0,0 +1,32 @@
import java.io.*;

aspect MyAspect {
before(): execution(* MyOtherClass.read()) { }
}


class MyClass<T,E> implements MyInterface<T> {

public static void main(String[] arg) { }

public T read() throws IOException {
return null;
}

public void exceptionDetected(E e) { }
}


interface MyInterface<T> {
public T read() throws IOException;
}

class MyOtherClass {
public void read() { }
}

public class pr121575 {
public static void main(String []argv) {
MyClass.main(null);
}
}

+ 23
- 0
tests/java5/generics/tvars/Case1.aj Näytä tiedosto

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

aspect MyAspect {
before(): execution(* read(..)) { }
}


class MyClass<T extends String,E extends Number> implements MyInterface<T> {

public static void main(String[] arg) { }

public void read(T t) throws IOException {
}

public void exceptionDetected(E e) { }
}


interface MyInterface<T> {
public void read(T t) throws IOException;
}


+ 23
- 0
tests/java5/generics/tvars/Case2.aj Näytä tiedosto

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

aspect MyAspect {
before(): execution(* read(..)) { }
}


class MyClass<T extends String,E extends Number> implements MyInterface<E> {

public static void main(String[] arg) { }

public void read(E e) throws IOException {
}

public void exceptionDetected(E e) { }
}


interface MyInterface<T> {
public void read(T t) throws IOException;
}


+ 23
- 0
tests/java5/generics/tvars/Case3.aj Näytä tiedosto

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

aspect MyAspect {
before(): execution(* read(..)) { }
}


class MyClass<T extends String,E extends Number> implements MyInterface<T> {

public static void main(String[] arg) { }

public void read(E e) throws IOException {
}

public void exceptionDetected(E e) { }
}


interface MyInterface<T> {
public void read(T t) throws IOException;
}


Loading…
Peruuta
Tallenna