Skip to content

fix cast rewritten when extracting pattern decl. of type that is a type parameter - #40

Merged
ltcmelo merged 3 commits into
masterfrom
p31
Jul 20, 2022
Merged

ltcmelo merged 3 commits into
masterfrom
p31

Conversation

@ltcmelo

@ltcmelo ltcmelo commented Jul 20, 2022 •

Copy link
Copy Markdown
Contributor

When the type of the pattern is a type parameter (eg void f<T>(T p) { }), it can't be directly cast to another type. So I'm introducing an intermediate cast to object type (to all cases, as this cast is safe and preserve uniformity of every rewrite) to ensure that casts are correct.

@ltcmelo
ltcmelo requested a review from xavierpinho July 20, 2022 17:17
@ltcmelo
ltcmelo merged commit 0bb9ed8 into master Jul 20, 2022
@delete-merged-branch
delete-merged-branch Bot deleted the p31 branch July 20, 2022 17:31
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.

2 participants