Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Allows inherited methods to satisfy interface requirements. #81

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions modules/trans/decl.monkey
Original file line number Diff line number Diff line change
Expand Up @@ -1234,14 +1234,19 @@ Class ClassDecl Extends ScopeDecl
For Local iface:=Eachin implmentsAll
For Local decl:=Eachin iface.SemantedMethods()
Local found
For Local decl2:=Eachin SemantedMethods( decl.ident )
If decl.EqualsFunc( decl2 )
If decl2.munged
Err "Extern methods cannot be used to implement interface methods."
Local cdecl:=Self
While cdecl And Not found
For Local decl2:=Eachin cdecl.SemantedMethods( decl.ident )
If decl.EqualsFunc( decl2 )
If decl2.munged
Err "Extern methods cannot be used to implement interface methods."
Endif
found=True
Endif
found=True
Endif
Next
Next
cdecl=cdecl.superClass
Wend

If Not found
Err decl.ToString()+" must be implemented by class "+ToString()
Endif
Expand Down