Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Fix symbol types where an incomplete type check occurs #431

wants to merge 2 commits into from

Conversation

7sharp9
Copy link
Member

@7sharp9 7sharp9 commented Oct 9, 2015

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

7sharp9 added 2 commits October 9, 2015 16:06
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
@7sharp9
Copy link
Member Author

7sharp9 commented Oct 13, 2015

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))
Copy link
Contributor

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.

Copy link
Member Author

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?

@dsyme
Copy link
Contributor

dsyme commented Oct 13, 2015

It looks good. Unit tests?

@7sharp9
Copy link
Member Author

7sharp9 commented Oct 13, 2015

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.

rojepp pushed a commit to rojepp/FSharp.Compiler.Service that referenced this pull request Oct 13, 2015
@dsyme
Copy link
Contributor

dsyme commented Oct 13, 2015

@7sharp9 This kind of problem should occur whenever necessary referenced DLLs are not available and you have code that uses constructs in those DLLs.

@dsyme
Copy link
Contributor

dsyme commented Oct 15, 2015

Closed in favour of #442

@dsyme dsyme closed this Oct 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants