Open mattklein999 opened 8 years ago
The code is lexed/parsed as
let msg = "Interactive"
let add x y =
x + y
printfn "%d" (add 1 2)
That's not too unsurprising though. What's surprising is that the second line doesn't give a warning for being offside.
I thought the code is parsed in the way that @mattklein999 reported because of the confusing tool tips you get in VS - but perhaps that's just an artifact of some error recovery that happens after the code is parsed (?)
Please provide a succinct description of the issue.
From this question on Stack Overflow, given the script:
The output is: error.fsx(12,15): error FS0039: The value or constructor 'add' is not defined
Repro steps
Save the code given above (labeled as
error.fsx
) and run using fsi.exe version 4.0.Expected behavior
Don't treat the
printfn
line as indentedActual behavior
It seems that with the indentation, the F# parser actually parses the code as follows (from @tpetricek)
Don't be a dumdum.
Related information
Running fsi.exe v4.0