Project: AspectJ
Bug 151978 [3.2compiler] Generics program fails to compile
Reported: 2006-07-27 07:15:06 | Status: resolved fixed

generics problem, reported on newsgroup by Thomas Darimont //package de.tutorials.aspectj; public interface IMessage { void publish(); } interface IErrorMessage extends IMessage{ StackTraceElement[] getStackTrace(); } interface IObjectFactory<E> { public <T extends E> T create(Class<T> theObjectType, Object[] theParameters); } class MessageFactory implements IObjectFactory<IMessage>{ public <T extends IMessage> T create(Class<T> theObjectType, Object[] theParameters) { return null; } } class Main { public static void main(String[] args) { IErrorMessage message = new MessageFactory().create(IErrorMessage.class, new Object[]{"Foo","Bar"}); } }

Files changed in fix:
tests/bugs153/pr151978/IMessage.java tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java