Skip to content

Conversation

@dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Feb 11, 2020

This PR fixes an issue with generated implicit field setters of exported classes as reported in #1101.

What happened there was that the use of makeReplace was incorrect in that it obtains temporary locals from the current function's flow, but there is no actual current function, hence no flow, for generated setters. Instead, such a function has exactly two locals, its parameters, of which one became overwritten with the old value due to a duplicate temp being picked, leading to an invalid load.

The fix applied here implements custom but otherwise identical replace logic, with a single temp local for the intermediate value.

@dcodeIO dcodeIO merged commit 1ec68fe into master Feb 11, 2020
@dcodeIO dcodeIO deleted the fix-implicit-setter branch March 15, 2020 13:35
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