In Visual Studio 2015:
let myFunction (``string`` : string) =
"\"Quoted string\"" |> (Regex "\"[^\"]*\"").Match |> string
let myOtherFunction (str : string) =
"\"Quoted string\"" |> (Regex "\"[^\"]*\"").Match |> string
The first function generates a compiler error, the function is stringunderlined in red. ("This expression was supposed to be of type Match → 'a, but here it has a string of type")
The second function is beautiful, no problem.
Is it for design?
source
share