Skip to content

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Sep 27, 2023

Fixes issue #16009 .

This was happening after introduction of static let.
However, for incremental classes, the error was always there: https://sharplab.io/#v2:DYLgZgzgNALiCWwA+A7AhgWwKYQA5oGMsACAWQE8AFAJwHsBzazAWACg2NaATAV2BOpYCZbnxIBeYmzbFZxWriwpiAZXIQYWDNNZzi/GMQBG8FF1P1ikgGK1aAdQAW8Ao+tpEEAHQqYaGC6kWkZY1Dp6nLz8xAByOJpcpKLR4jJ6cgbEAEKm5iiWkihYAO7yRgBWABQAlGnpUrpyMOSKxLYOzq72tNQA1hBWdeka/i7E2Bgh1Kp+AQRBk6FWsfFYiclYXjlmFuFNLSTtTi5uHsAQlWgIKDDVg431maYjKEQAgsto6UN6I3PjwSWvlG80B00kcQ0aySUU22zy9B+9QakTExDeBBgPDQwBoDCYGGWQwUShEsOJimUaih2geDT0Jh2+S8ABVaL5qBYasQkAA+YgAYVoKAgtH4XnsnM0ABlTFggA

This minimizes the impact by skipping a fake member generation in case it is not needed for static let purposes.

The error remains for the (hopefully rare) combination of:
module rec
forward-usage of declared static members
having a static member on a type which needs incremental constructor

Also, the existing failing code does emit the diagnostics 40 warning about a recursive issue -> but it is not an error.

@T-Gro T-Gro changed the base branch from main to release/dev17.8 September 27, 2023 12:59
@T-Gro
Copy link
Member Author

T-Gro commented Sep 27, 2023

/azp run

@T-Gro T-Gro marked this pull request as ready for review September 27, 2023 14:59
@T-Gro T-Gro requested a review from a team as a code owner September 27, 2023 14:59
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@T-Gro T-Gro enabled auto-merge (squash) September 28, 2023 17:13
@T-Gro T-Gro merged commit 38b2bac into release/dev17.8 Sep 28, 2023
@T-Gro T-Gro deleted the modulerec-staticinit-regression branch September 28, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants