-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix symbol types where an incomplete type check occurs #431
Conversation
The PR fixed the fragmented types that are currently presented on an incomplete type check i.e. if a referenced nuget package is not restored etc. e.g. types may be represented by `?25354-> ?25345` rather than ’a -> ‘b Ive fixed all the occurrence that I can see happen although there could be further issues in `FSharpMemberOrFunctionOrValue.FullType` as I only touched `ValRef`’s
Any comments? |
@@ -1460,8 +1470,8 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | |||
let tau = v.TauType | |||
let argtysl,_ = GetTopTauTypeInFSharpForm cenv.g curriedArgInfos tau range0 | |||
let argtysl = if v.IsInstanceMember then argtysl.Tail else argtysl | |||
|
|||
[ for argtys in argtysl do | |||
let prettyArgtysl = argtysl |> List.map (fun a -> PrettyTypes.PrettifyTypesN1 cenv.g (a, tau)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should prettify tau, not the pieces one by one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand, PrettyTypes.PrettifyTypes1 tau
?
Would we not have to do GetTopTauTypeInFSharpForm
and then disregard the head if its an instance?
It looks good. Unit tests? |
Unit test will require a discrete fragmented type failure case, the only one I know of is when a nuget package is not restored, Ill try and get a small unit test to cover this. |
@7sharp9 This kind of problem should occur whenever necessary referenced DLLs are not available and you have code that uses constructs in those DLLs. |
Closed in favour of #442 |
The PR fixed the fragmented types that are currently presented on an
incomplete type check i.e. if a referenced nuget package is not
restored etc.
e.g. types may be represented by
?25354-> ?25345
rather than ’a -> ‘bIve fixed all the occurrence that I can see happen although there could
be further issues in
FSharpMemberOrFunctionOrValue.FullType
as I onlytouched
ValRef
’s