Skip to content

byref parameters starting with some non-ASCII identifiers cannot be set. #18164

Open
@ijklam

Description

@ijklam

byref parameters whose identifier starting with some non-ASCII (like Chinese characters) cannot be set.

Repro steps

Enter this code in fsi:

let f (x: int byref) = x <- x + 1
let f3 (a: int byref) = a叉 <- a叉 + 1
let f2 (: int byref) =<-+ 1 // fails to compile
let f4 (a: int byref) = 叉a <- 叉a + 1 // fails to compile

Expected behavior

The code can be compiled successfully

Actual behavior

A FS0027 was thrown.

Image

Known workarounds

Don't use non-ASCII identifiers.

Related information

Provide any related information (optional):

  • Windows 11 23H2
  • .NET 9 with F#9
  • Editing Tools: fsi or ionide-vscode

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions