Skip to content

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

Closed
@ijklam

Description

@ijklam

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.

Metadata

Metadata

Assignees

Labels

Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions