close
Skip to content

fix: check function's instance class is a subclass of virtual method - #1985

Merged
MaxGraey merged 6 commits into
AssemblyScript:mainfrom
willemneal:fix/base_class_cast_issue
Jul 23, 2021
Merged

fix: check function's instance class is a subclass of virtual method#1985
MaxGraey merged 6 commits into
AssemblyScript:mainfrom
willemneal:fix/base_class_cast_issue

Conversation

@willemneal

Copy link
Copy Markdown
Contributor

fixes #1971

Generic base classes have an issue where all instances regardless of generic are collected as instances of its virtual methods. This checks to make sure that only methods from classes that extend the generic base class are added to the virtual table.

@willemneal
willemneal requested review from MaxGraey and dcodeIO July 15, 2021 18:09
Comment thread tests/compiler/class-overloading-cast.ts Outdated
Comment thread tests/compiler/class-overloading-cast.ts Outdated
Comment thread src/compiler.ts Outdated
Comment thread tests/compiler/class-overloading-cast.ts Outdated
@willemneal
willemneal requested review from MaxGraey and dcodeIO July 15, 2021 19:29
@willemneal

Copy link
Copy Markdown
Contributor Author

@dcodeIO @MaxGraey

Anything else needed for this?

Comment thread src/compiler.ts
@willemneal
willemneal requested a review from dcodeIO July 19, 2021 13:13
@willemneal

Copy link
Copy Markdown
Contributor Author

@MaxGraey Thoughts?

@willemneal

Copy link
Copy Markdown
Contributor Author

@MaxGraey Are we waiting to release this with a major bump? It should be a patch and could be merged now.

@willemneal

Copy link
Copy Markdown
Contributor Author

@MaxGraey, this is bug is a blocker for me.

@MaxGraey
MaxGraey merged commit 1958554 into AssemblyScript:main Jul 23, 2021
@MaxGraey

Copy link
Copy Markdown
Member

Thanks!

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.

class extends basis class with generic compile error

3 participants