This code fragment is compiled:
let test =
let x = 1
printfn "%A" x
If the last line is removed, there is the following compilation error:
error FS0588: Block following this 'let' is unfinished. Expect an expression.
What does this message mean? In C#/C++ I would expect the "Unused variable" warning in such situation, but F# gives something different.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…