From 86797879e8c484fdeea87ea2e8304a3354af1e1e Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Jan 2006 13:35:01 +0000 Subject: [PATCH] testcode for 124105 --- tests/bugs151/pr124105/com/test/IOption.java | 9 +++++ tests/bugs151/pr124105/com/test/IXOption.java | 17 ++++++++++ tests/bugs151/pr124105/com/test/IYOption.java | 34 +++++++++++++++++++ tests/bugs151/pr124105/com/test/IZOption.java | 4 +++ .../pr124105/com/test/MyBrokenXOption.java | 10 ++++++ .../bugs151/pr124105/com/test/MyXOption.java | 9 +++++ .../bugs151/pr124105/com/test/OptionAspect.aj | 11 ++++++ .../bugs151/pr124105/com/test/OptionType.java | 9 +++++ 8 files changed, 103 insertions(+) create mode 100644 tests/bugs151/pr124105/com/test/IOption.java create mode 100644 tests/bugs151/pr124105/com/test/IXOption.java create mode 100644 tests/bugs151/pr124105/com/test/IYOption.java create mode 100644 tests/bugs151/pr124105/com/test/IZOption.java create mode 100644 tests/bugs151/pr124105/com/test/MyBrokenXOption.java create mode 100644 tests/bugs151/pr124105/com/test/MyXOption.java create mode 100644 tests/bugs151/pr124105/com/test/OptionAspect.aj create mode 100644 tests/bugs151/pr124105/com/test/OptionType.java diff --git a/tests/bugs151/pr124105/com/test/IOption.java b/tests/bugs151/pr124105/com/test/IOption.java new file mode 100644 index 000000000..38cda6976 --- /dev/null +++ b/tests/bugs151/pr124105/com/test/IOption.java @@ -0,0 +1,9 @@ +package com.test; + + + + + +public interface IOption { + +} diff --git a/tests/bugs151/pr124105/com/test/IXOption.java b/tests/bugs151/pr124105/com/test/IXOption.java new file mode 100644 index 000000000..afddf596a --- /dev/null +++ b/tests/bugs151/pr124105/com/test/IXOption.java @@ -0,0 +1,17 @@ +package com.test; + + + + + + + + + + + + + +public interface IXOption extends IOption { + +} diff --git a/tests/bugs151/pr124105/com/test/IYOption.java b/tests/bugs151/pr124105/com/test/IYOption.java new file mode 100644 index 000000000..324d1c9e1 --- /dev/null +++ b/tests/bugs151/pr124105/com/test/IYOption.java @@ -0,0 +1,34 @@ +package com.test; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +public interface IYOption extends IOption { + +} diff --git a/tests/bugs151/pr124105/com/test/IZOption.java b/tests/bugs151/pr124105/com/test/IZOption.java new file mode 100644 index 000000000..39b1e29f4 --- /dev/null +++ b/tests/bugs151/pr124105/com/test/IZOption.java @@ -0,0 +1,4 @@ +package com.test; +public interface IZOption extends IOption { + +} diff --git a/tests/bugs151/pr124105/com/test/MyBrokenXOption.java b/tests/bugs151/pr124105/com/test/MyBrokenXOption.java new file mode 100644 index 000000000..d718d2327 --- /dev/null +++ b/tests/bugs151/pr124105/com/test/MyBrokenXOption.java @@ -0,0 +1,10 @@ +package com.test; + + +public class MyBrokenXOption implements IXOption { + + public MyBrokenXOption() { + super(); + } + +} diff --git a/tests/bugs151/pr124105/com/test/MyXOption.java b/tests/bugs151/pr124105/com/test/MyXOption.java new file mode 100644 index 000000000..5cd84042a --- /dev/null +++ b/tests/bugs151/pr124105/com/test/MyXOption.java @@ -0,0 +1,9 @@ +package com.test; + +public class MyXOption implements IXOption { + + public MyXOption(OptionType optionType) { + super(); + } + +} diff --git a/tests/bugs151/pr124105/com/test/OptionAspect.aj b/tests/bugs151/pr124105/com/test/OptionAspect.aj new file mode 100644 index 000000000..e7effecec --- /dev/null +++ b/tests/bugs151/pr124105/com/test/OptionAspect.aj @@ -0,0 +1,11 @@ +package com.test; + +public aspect OptionAspect { + interface IBadOptionSubtype {}; + + declare parents : (IOption+ && !IOption && !IXOption && !IYOption && !IZOption) && !hasmethod(new(OptionType)) + implements IBadOptionSubtype; + + declare error : staticinitialization(IOption+ && IBadOptionSubtype+) + : "IOption implementations must provide a constructor which accepts an OptionType"; +} diff --git a/tests/bugs151/pr124105/com/test/OptionType.java b/tests/bugs151/pr124105/com/test/OptionType.java new file mode 100644 index 000000000..ba4dfbf57 --- /dev/null +++ b/tests/bugs151/pr124105/com/test/OptionType.java @@ -0,0 +1,9 @@ +package com.test; + +public class OptionType { + + public OptionType() { + super(); + } + +} -- 2.39.5