mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-28 17:57:06 +02:00
24 lines
324 B
Java
24 lines
324 B
Java
![]() |
|
||
|
|
||
|
interface Result {}
|
||
|
|
||
|
interface Factory {
|
||
|
Result getInstance();
|
||
|
}
|
||
|
|
||
|
class B {}
|
||
|
|
||
|
class D implements Factory {}
|
||
|
|
||
|
aspect EnsureBImplementsResult {
|
||
|
|
||
|
// bug: this should work
|
||
|
declare parents: B implements Result;
|
||
|
|
||
|
|
||
|
// bug: get error here wrt invalid return type
|
||
|
public B D.getInstance() {
|
||
|
return new B();
|
||
|
}
|
||
|
}
|