fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

AND operator stopped working in some active patterns

Open psfinaki opened this issue 1 year ago • 0 comments

Active pattern after the & used to be allowed:

let (_ : exn & Failure _ | _) = exn ()

Same applies for a match on an exception type declared with the exception keyword, which was also allowed before:

exception MyExn

let (_ : exn & MyExn | _) = exn ()

This causes parser errors now, like

Constraint intersection syntax may only be used with flexible types, e.g. '#IDisposable & #ISomeInterface'.

Originally posted by @brianrourkeboll in https://github.com/dotnet/fsharp/pull/17113#discussion_r1596020344

psfinaki avatar May 10 '24 16:05 psfinaki