You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeMyType=|[<Constant(null)>] NullCase
| NonNullCase
letf(x:Union<Dom.Node,MyType>)=match x with| Union1Of2 _->"it's not my type"| Union2Of2 _->"it's my type"
compiles to this:
f=function(x){returnx.constructor===Global.Object?"it's my type":"it's not my type";};
The problem is that if we call f (Union2Of2 NullCase), then x is null and the access to .constructor fails.
The following:
compiles to this:
The problem is that if we call
f (Union2Of2 NullCase)
, thenx
isnull
and the access to.constructor
fails.This issue causes crashes in WebSharper.UI here.
The text was updated successfully, but these errors were encountered: