Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structural interface cannot override method of extending interface #647

Open
EotT123 opened this issue Dec 7, 2024 · 0 comments
Open

Structural interface cannot override method of extending interface #647

EotT123 opened this issue Dec 7, 2024 · 0 comments
Labels

Comments

@EotT123
Copy link
Contributor

EotT123 commented Dec 7, 2024

Describe the bug
A structural interface cannot override a method from an extended interface. Removing the @Structural annotation from the 'child' interface resolves the issue.

@Structural
public interface ParentIntf {
   Object foo();
}

@Structural
public interface ChildIntf extends ParentIntf {
   @Override // ERROR: Method does not override method from its superclass
   default Object foo(){
      return "test";
   }
}

Expected Behavior
The ChildIntf interface should be allowed to override the foo() method from ParentIntf interface without any errors, regardless of the @Structural annotation.

Desktop (please complete the following information):

  • OS Type & Version: Windows 10 22H2
  • Java/JDK version: openjdk 23.0.1
  • IDE version (IntelliJ IDEA or Android Studio): IntelliJ IDEA 2024.3
  • Manifold version: 2024.1.42 (latest version)
  • Manifold IntelliJ plugin version: 2024.1.13 (latest version)
@rsmckinney rsmckinney added the bug label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants