Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Jul 19, 2023

@benjamin-hodgson
Copy link

benjamin-hodgson commented Jul 19, 2023

Thanks for doing this!

Could be worth noting that this can happen even in non-recursive contexts too? The repro from the issue didn't feature recursion - just a "bigger" return type

@MichalStrehovsky
Copy link
Member Author

Could be worth noting that this can happen even in non-recursive contexts too? The repro from the dotnet/runtime#85184 didn't feature recursion - just a "bigger" return type

I don't know how to word it without having to go into too many implementation details. It's still recursion, but with extra steps (the G() method on the newly allocated instance needs to be callable and that's where the recursion is). The compiler has to consider things that are statically reachable but may or may not be reached at runtime.

@BillWagner BillWagner modified the milestones: July 2023, August 2023 Aug 4, 2023
@MichalStrehovsky MichalStrehovsky merged commit 2dc7174 into main Sep 4, 2023
@MichalStrehovsky MichalStrehovsky deleted the MichalStrehovsky-patch-2 branch September 4, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants