-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(go): missing methods for multiple inheritance of the same interfa…
…ce (#2701) If a class implements an interface from multiple paths (e.g. directly and via a base), then Go compilation fails with an ambiguity issue. Simplify by always re-implementing all methods and properties in derived classes. Fixes #2700
- Loading branch information
Elad Ben-Israel
authored
Mar 15, 2021
1 parent
b7a560d
commit e31f0e1
Showing
11 changed files
with
1,525 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export interface IFoo { | ||
bar(): string; | ||
readonly baz: number; | ||
} | ||
|
||
export class Base implements IFoo { | ||
public readonly baz = 120; | ||
public bar() { | ||
return 'bar'; | ||
} | ||
} | ||
|
||
export class Derived extends Base implements IFoo { | ||
public zoo() { | ||
return 'zoo'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.