Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Compiler/Checking/Expressions/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10733,8 +10733,15 @@ and TcMatchClause cenv inputTy (resultTy: OverallTy) env isFirst tpenv synMatchC

let inputTypeForNextPatterns=
let removeNull t =
let stripped = stripTyEqns cenv.g t
replaceNullnessOfTy KnownWithoutNull stripped
// Check if this is a type abbreviation that we should preserve
match t with
| TType_app (tcref, tinst, _) when tcref.Deref.IsTypeAbbrev ->
// Preserve the type abbreviation structure while refining nullness
TType_app (tcref, tinst, KnownWithoutNull)
| _ ->
// Use existing logic for non-abbreviation types
let stripped = stripTyEqns cenv.g t
replaceNullnessOfTy KnownWithoutNull stripped
let rec isWild (p:Pattern) =
match p with
| TPat_wild _ -> true
Expand Down
Loading