Skip to content

FSI sometimes gets confused by tabs: "Unexpected symbol # in interaction. Expected incomplete structured construct at or before this point" #14779

@MaxWilson

Description

@MaxWilson

FSI sometimes gets confused by tabs.

Repro steps

  1. Open Microsoft (R) F# Interactive version 12.5.0.0 for F# 7.0

  2. Type in the following program

    let three() =
        3
  1. Highlight the second line (" 3") and Send to Interactive.

Expected behavior

FSI should evaluate and return 3.

Actual behavior

Error.

    System.IO.File.WriteAllText(@"C:\Users\wilso\AppData\Local\Temp\tmpE9F5.tmp.pid", string (System.Diagnostics.Process.GetCurrentProcess().Id));;
  ^

    stdin(1,1): error FS0010: Unexpected symbol # in interaction. Expected incomplete structured construct at or before this point, ';', ';;' or other token.

Known workarounds

Un-indent code before sending it to F# interactive.

let three() =
3

Related information

  • Operating system: Windows
  • .NET Runtime kind: Net Core 7.0
  • Editing Tools: VS 2022 17.6.0 Preview 1.0

screenshot

Metadata

Metadata

Assignees

Labels

Area-VS-FSIVS window and commands for F# InteractiveBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.Regression

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions