Skip to content

fix: the function signatures of two interfaces are the same #1855 #2272

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

Closed

Conversation

technohippy
Copy link
Member

fix #1855

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@technohippy technohippy changed the title #1855 same interfaces fix: the function signatures of two interfaces are the same #1855 Apr 21, 2022
Comment on lines +840 to +848
if (!isInterface) {
// check `this` type
var thisThisType = this.thisType;
var targetThisType = target.thisType;
if (thisThisType) {
if (!targetThisType || !thisThisType.isAssignableTo(targetThisType)) return false;
} else if (targetThisType) {
return false;
}
Copy link
Member

@dcodeIO dcodeIO Apr 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One case I could imagine where skipping the check entirely leads to issues is an override of (this: i32, ...): ..., where then there would be two classes extending the same interface with an incompatible this type. Perhaps keep a check for managed-ness / strict assignability of the types?

@dcodeIO
Copy link
Member

dcodeIO commented Nov 29, 2022

Has been tackled alongside #2548 iirc. The test used in this PR passes now.

@dcodeIO dcodeIO closed this Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When the function signatures of two interfaces are the same, they cannot be implemented at the same time
2 participants