Open ijklam opened 8 months ago
Looking into this. I think this should not throw an internal error. Found a workaround to make this compile adding unit -> unit
let (|T|) (f: _ -> _) = ()
match id with T -> ()
let (T: unit -> unit) = id
Edit: this will also avoid the internal error
let (|T|) (f: unit -> unit) = f()
match id with T -> ()
let (T) = id
let (|T|) f = f()
match id with T c -> c
let (T) = id
cc @vzarytovskii
Repro steps
Input following code into fsi:
Expected behavior
Both works.
Actual behavior
let
way doesn't work.Known workarounds
Use
match
.Related information
Provide any related information (optional):