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
Super minor, but might as well log it. Up for grabs.
I would think this code should be legal
typeA()=classend[<AllowNullLiteral(false)>]typeB()=inherit A()// error FS0935: Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal
The check makes sense, but fails to consider the case when the attribute explicitly disallows nulls. I made the same mistake in #376.
Fix is to change hasAllowNullLiteralAttr in tc.fs to actually check the value of the attribute, something like TryFindTyconRefBoolAttribute cenv.g m cenv.g.attrib_AllowNullLiteralAttribute thisTyconRef = Some(true). [That is around line 13985 of tc.fs, unfortunately GH won't render that many lines so I can't link directly to it 😭]
The text was updated successfully, but these errors were encountered:
Super minor, but might as well log it. Up for grabs.
I would think this code should be legal
The check makes sense, but fails to consider the case when the attribute explicitly disallows nulls. I made the same mistake in #376.
Fix is to change
hasAllowNullLiteralAttr
in tc.fs to actually check the value of the attribute, something likeTryFindTyconRefBoolAttribute cenv.g m cenv.g.attrib_AllowNullLiteralAttribute thisTyconRef = Some(true)
. [That is around line 13985 of tc.fs, unfortunately GH won't render that many lines so I can't link directly to it 😭]The text was updated successfully, but these errors were encountered: