From 4b5f72539556206856cece31c722e4ef77b150ff Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 19 Aug 2008 20:43:56 +0000 Subject: [PATCH] 242797: crappy bounds checking in TypeVariable --- .../bugs162/pr242797/case3/GenericMethodAspect.aj | 10 ++++++++++ .../bugs162/pr242797/case3/GenericMethodImpl.java | 10 ++++++++++ .../pr242797/case3/GenericMethodImpl2.java | 15 +++++++++++++++ .../pr242797/case3/GenericMethodInterface.java | 12 ++++++++++++ tests/bugs162/pr242797/case3/Type1.java | 8 ++++++++ tests/bugs162/pr242797/case3/Type2.java | 8 ++++++++ 6 files changed, 63 insertions(+) create mode 100644 tests/bugs162/pr242797/case3/GenericMethodAspect.aj create mode 100644 tests/bugs162/pr242797/case3/GenericMethodImpl.java create mode 100644 tests/bugs162/pr242797/case3/GenericMethodImpl2.java create mode 100644 tests/bugs162/pr242797/case3/GenericMethodInterface.java create mode 100644 tests/bugs162/pr242797/case3/Type1.java create mode 100644 tests/bugs162/pr242797/case3/Type2.java diff --git a/tests/bugs162/pr242797/case3/GenericMethodAspect.aj b/tests/bugs162/pr242797/case3/GenericMethodAspect.aj new file mode 100644 index 000000000..8bd5d166d --- /dev/null +++ b/tests/bugs162/pr242797/case3/GenericMethodAspect.aj @@ -0,0 +1,10 @@ +import java.util.ArrayList; +import java.util.List; + +public aspect GenericMethodAspect { + + public List GenericMethodInterface.getStuff(){ + return new ArrayList(); + } + +} diff --git a/tests/bugs162/pr242797/case3/GenericMethodImpl.java b/tests/bugs162/pr242797/case3/GenericMethodImpl.java new file mode 100644 index 000000000..0c5218598 --- /dev/null +++ b/tests/bugs162/pr242797/case3/GenericMethodImpl.java @@ -0,0 +1,10 @@ +import java.util.LinkedList; +import java.util.List; + +public class GenericMethodImpl implements GenericMethodInterface{ + + public List getStuff(){ + return new LinkedList(); + } + +} diff --git a/tests/bugs162/pr242797/case3/GenericMethodImpl2.java b/tests/bugs162/pr242797/case3/GenericMethodImpl2.java new file mode 100644 index 000000000..0f79eb234 --- /dev/null +++ b/tests/bugs162/pr242797/case3/GenericMethodImpl2.java @@ -0,0 +1,15 @@ +import java.util.List; + + +/* + * Created on Aug 19, 2008 + */ + +public class GenericMethodImpl2 extends GenericMethodImpl { + + @Override + public List getStuff() { + return super.getStuff(); + } + +} diff --git a/tests/bugs162/pr242797/case3/GenericMethodInterface.java b/tests/bugs162/pr242797/case3/GenericMethodInterface.java new file mode 100644 index 000000000..c99f2e9e9 --- /dev/null +++ b/tests/bugs162/pr242797/case3/GenericMethodInterface.java @@ -0,0 +1,12 @@ +import java.util.List; + + +/* + * Created on Aug 19, 2008 + */ + +public interface GenericMethodInterface { + + public List getStuff(); + +} diff --git a/tests/bugs162/pr242797/case3/Type1.java b/tests/bugs162/pr242797/case3/Type1.java new file mode 100644 index 000000000..8d6f2ae22 --- /dev/null +++ b/tests/bugs162/pr242797/case3/Type1.java @@ -0,0 +1,8 @@ + +/* + * Created on Aug 19, 2008 + */ + +public interface Type1 { + +} diff --git a/tests/bugs162/pr242797/case3/Type2.java b/tests/bugs162/pr242797/case3/Type2.java new file mode 100644 index 000000000..4e13f36a7 --- /dev/null +++ b/tests/bugs162/pr242797/case3/Type2.java @@ -0,0 +1,8 @@ + +/* + * Created on Aug 19, 2008 + */ + +public class Type2 implements Type1 { + +} -- 2.39.5