From 0e44567ab43ba318d604f2968b7c178862cd5ebd Mon Sep 17 00:00:00 2001 From: Stephan Herrmann Date: Sat, 3 Dec 2016 14:25:35 +0100 Subject: Regression fix: expect ast and binding of synth role ifc to diverge --- .../org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java index 329e69781..73ebef46a 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java @@ -492,6 +492,11 @@ void checkForMissingHashCodeMethod() { void checkForRedundantSuperinterfaces(ReferenceBinding superclass, ReferenceBinding[] superInterfaces) { if (superInterfaces == Binding.NO_SUPERINTERFACES) return; +//{ObjectTeams: implicit inheritance among roles is not visible at AST level + if (this.type.isRole()) + return; + // TODO: should do this check during copyinheritance.TypeLevel! +// SH} SimpleSet interfacesToCheck = new SimpleSet(superInterfaces.length); SimpleSet redundantInterfaces = null; // bark but once. for (int i = 0, l = superInterfaces.length; i < l; i++) { @@ -506,10 +511,6 @@ void checkForRedundantSuperinterfaces(ReferenceBinding superclass, ReferenceBind } redundantInterfaces.add(implementedInterface); TypeReference[] refs = this.type.scope.referenceContext.superInterfaces; -//{ObjectTeams: implicit inheritance among role interfaces is not visible at AST level - if (refs == null) - continue; -// SH} for (int r = 0, rl = refs.length; r < rl; r++) { if (TypeBinding.equalsEquals(refs[r].resolvedType, toCheck)) { problemReporter().redundantSuperInterface(this.type, refs[j], implementedInterface, toCheck); -- cgit v1.2.3