Skip to content

Conversation

@KevinRansom
Copy link
Contributor

@KevinRansom KevinRansom commented Feb 7, 2024

Fixes #16431

There is a bug with DU initialization, that causes the DU ID for each type to be initialized after all of the remainder of the static initialization.

The fix is to ensure that we provoke the static initialization code in the .cctor for the DUafter the unique ids have been assigned.

The PR for static initialization will need to be updated to reflect this new behavior.

This is not actually a breaking change, so we will treat it as a bug fix.

  • Fix initialization
  • Add regression test

@KevinRansom KevinRansom requested a review from a team as a code owner February 7, 2024 06:47
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/8.0.300.md

@psfinaki psfinaki enabled auto-merge (squash) February 8, 2024 12:47
@psfinaki psfinaki merged commit ebf21ff into dotnet:main Feb 8, 2024
@KevinRansom KevinRansom deleted the fix16431 branch March 21, 2024 22:24
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.

static let bindings will fail unexpectedly if that binding uses a no-arg case in a Discriminating Union (DU) type

4 participants