Revert "Some fixes to nullability (#365)" (#366)

This reverts commit 8d275f0047.
This commit is contained in:
Patrick Stevens
2025-04-20 18:02:40 +01:00
committed by GitHub
parent 8d275f0047
commit 7930039ad1
14 changed files with 65 additions and 1697 deletions

View File

@@ -356,19 +356,3 @@ module internal AstHelper =
}
)
| _ -> failwithf "Failed to get record elements for type that was: %+A" repr
let raiseIfNull (variable : Ident) : SynExpr =
SynExpr.createMatch
(SynExpr.createIdent' variable)
[
SynMatchClause.create
SynPat.createNull
(SynExpr.applyFunction
(SynExpr.createIdent "raise")
(SynExpr.paren (
SynExpr.applyFunction
(SynExpr.createLongIdent [ "System" ; "ArgumentNullException" ])
(SynExpr.CreateConst ())
)))
SynMatchClause.create (SynPat.named "v") (SynExpr.createIdent "v")
]