Skip to content

Conversation

@alfonsogarciacaro
Copy link
Contributor

I didn't implement IsBaseValue, because I couldn't find a case where you can get a base reference without using BasicPatterns.BaseValue active pattern (which doesn't include a FSharpMemberOrFunctionOrValue value).

Also adds some tests for these properties and for the FSharpMemberOrFunctionOrValue.Overloads. The latter doesn't pass at the moment, see #356.

Can you please review the PR? Cheers!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be shortened to v.BaseOrThisInfo = CtorThisVal.

@dungpa
Copy link
Contributor

dungpa commented Jul 10, 2015

Looks good. It would be great to fix the failing test if it's meant to be a part of the changes.

@alfonsogarciacaro
Copy link
Contributor Author

Thanks a lot for your useful comments, @dungpa!

I've fixed the PR. You're right about the overloads (I had a look at the issue, but unfortunately my limited knowledge of the project didn't get me too far), so I deleted the test.

About walking the typed tree in the tests, I'm using the compiler services for FunScript where I'm accessing the symbols mostly through the AST and, as I've found some disagreements when you retrieve a symbol via the AST or something like GetAllUsesOfAllSymbols (as with Overloads()), I want to be sure the properties also work properly in the former case. I hope this is OK, but if it's not, tell me and I'll change the unit tests.

Cheers!

@dungpa
Copy link
Contributor

dungpa commented Jul 12, 2015

Great jobs. Thanks a lot.

I'm not aware that anyone uses typed tree API extensively. There are probably inconsistencies to iron out.

dungpa added a commit that referenced this pull request Jul 12, 2015
Implements FSharpMemberOrFunctionOrValue.IsConstructorThisValue, IsMemberThisValue & LiteralValue
@dungpa dungpa merged commit 192beb8 into fsharp:master Jul 12, 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