Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static let and members on records cause invalid constructor generation #3923

Open
joprice opened this issue Oct 11, 2024 · 1 comment
Open

Comments

@joprice
Copy link
Contributor

joprice commented Oct 11, 2024

Description

When a record is augmented with an static member or a static let, extra constructor parameters are generated for each, but the constructor call does not provide these parameters, resulting in the constructor arguments arbitrarily being assigned to slots intended for static parameters.

Repro code

[Please provide the F# code to reproduce the problem or a link to the REPL.
Ideally, it should be possible to easily turn this code into a unit test.](https://fable.io/repl/#?code=PYBwpgdgBAYghgIwDZgHQGFgCcwChcAuAnuFABpQC8UA3lAJYAmAXAxAQL64Du9BAFrijCoAZwJwC9AMZQUBKAH04VKACYRUISPGSZUALZgDCMFigrqy-AHobUHAQCuWCKKgAGADRj6EaWBQAoEA5pBmkmCMUNLAbgRYTtIE2EFwANZg7gI4gSBwWHAG7rh2FhDRcUhEUHGB9O4gWMAAbkxRUNz8kBZiElKy8gyNOKIQYAS4QwRZBACMqjRMqnNcAFIAyqixbsAoqEjAIQAUM+JzqEwAlPjEpACaxwwsbARXVNrCugNyE0qW6k0wk+fT0siMJjMvWoahBENM5kUl2i1CYtnsjhcbigcx8cHcYAAHuBklEfKI-AEgt0YnFxIlkqkJJl3CoKRAQigoPlCkYZlgpn8zgQNNRHstqHMbpttnS9mhDidhWpkVcgA&html=Q&css=Q)

Expected and actual results

Static members on records should not break record constructor call sites.

Related information

  • Fable version: 4.22.0
  • Operating system OSX
@davedawkins
Copy link
Contributor

I saw this too, thank you for logging!!

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

No branches or pull requests

2 participants