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

Obsolete attribute warning/error is not taken into account when used with a unit of measure #18181

Closed
edgarfgp opened this issue Dec 29, 2024 · 0 comments · Fixed by #18182
Closed
Labels
Milestone

Comments

@edgarfgp
Copy link
Contributor

Please provide a succinct description of the issue.

Repro steps

Consider the following code:

open System
[<Measure; Obsolete("Use cm2")>]
type cm

let myCm = 3<cm> // cm should warn/error as obsolete

[<Measure>] type ml = cm^3 // cm should warn/error as obsolete


[<Measure; Obsolete("Use kg2")>]
type kg

[<Measure>] type m

[<Measure; Obsolete("Use s2")>]
type s

// Force, Newtons.
[<Measure>] type N = kg m / s^2 //  // `kg` and `s` should warn/error as obsolete

If possible attach a zip file with the repro case. This often makes it easier for others to reproduce.
The zip file should ideally represent the situation just before the call/step that is problematic.

Expected behavior

Warning/Error should be shown when using obsolete UOM

Actual behavior

No Warning/Error are shown when using obsolete UOM

Provide a description of the actual behaviour observed.

Known workarounds

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants