From db76c175037c10ce21fc8f7fe681162e31082445 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Mon, 26 Jun 2023 08:11:38 +0200 Subject: Add method ArrayReferenceType.equals to fix failing tests This also fixes a bug. Previously, ResolvedType.equals was used for equality check, and in there is a '==' comparison, which does not work for two different ArrayReferenceType instances, even if the component type is the same. Relates to #246. Signed-off-by: Alexander Kriegisch --- tests/bugs1920/github_246/ITDAspect.aj | 10 ++++++++++ .../test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/bugs1920/github_246/ITDAspect.aj b/tests/bugs1920/github_246/ITDAspect.aj index fffef1651..7e4f30e3f 100644 --- a/tests/bugs1920/github_246/ITDAspect.aj +++ b/tests/bugs1920/github_246/ITDAspect.aj @@ -10,4 +10,14 @@ public aspect ITDAspect { public int App.foo(int parameter) { return parameter + 3; } + + public void App.foo(String... parameters) { } + + @Second + public int App.foo(int... parameters) { + int sum = 0; + for (int parameter : parameters) + sum += parameter; + return sum; + } } diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml index 2026df491..9f072c86d 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml @@ -181,8 +181,10 @@ - + + + -- cgit v1.2.3