Skip to content

Property initialization doesn't work without space before interpolated string #16696

Open
@Lanayx

Description

@Lanayx

Repro steps

type C() =
    member val Name = "" with get, set
    
let x = C(Name="123") //works
let y = C(Name=$"123") // doesn't work
let z = C(Name= $"123") // works

Sharplab

Expected behavior

All three cases should work

Actual behavior

Second case doesn't work

Known workarounds

Add space before value

Related information

.NET 8
F# 8

Metadata

Metadata

Assignees

Type

No type

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions