Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upClass with [<AllowNullLiteral(false)>] barred from inheriting from normal non-nullable class #383
Labels
Comments
This comment has been minimized.
This comment has been minimized.
@latkin I want to look into it, can you point me the right place where a test for this case should be placed? |
This comment has been minimized.
This comment has been minimized.
I've found some tests covering
|
This comment has been minimized.
This comment has been minimized.
Adding some cases to |
yatli
pushed a commit
to yatli/visualfsharp
that referenced
this issue
May 16, 2019
fix appveyor build
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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