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

Struct optional parameter with caller info attributes will fails in type check #18386

Open
ijklam opened this issue Mar 15, 2025 · 0 comments
Open
Assignees
Labels
Area-Compiler-Checking Type checking, attributes and all aspects of logic checking Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@ijklam
Copy link
Contributor

ijklam commented Mar 15, 2025

Struct optional parameter with caller info attributes will fails in type check.

Image

Repro steps

Sample code:

open System.Runtime.CompilerServices
type Ab() =
  static member aa ([<CallerMemberName; Struct>]?b: string) = 
    b

Expected behavior

Can successfully be compiled.

Actual behavior

Provide a description of the actual behaviour observed.

Known workarounds

Do not use struct optional parameter.

@github-actions github-actions bot added this to the Backlog milestone Mar 15, 2025
@abonie abonie added Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Area-Compiler-Checking Type checking, attributes and all aspects of logic checking and removed Needs-Triage labels Mar 17, 2025
@T-Gro T-Gro self-assigned this Mar 18, 2025
@T-Gro T-Gro modified the milestones: Backlog, March 2025 Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-Checking Type checking, attributes and all aspects of logic checking Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
Status: New
Development

No branches or pull requests

3 participants