Skip to content

Conversation

@krauthaufen
Copy link
Contributor

When using AddressOf in quotations typeof function simple threw an exception which makes it impossible to call methods using byref-arguments.

Since there is a .NET-representation for byref-types why not use it?

Copy link
Contributor

@forki forki left a comment

Choose a reason for hiding this comment

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

Shouldn't the remaining case still give that specific error message?

@krauthaufen
Copy link
Contributor Author

Shouldn't AddressOf contain one sub-expression only?

@dsyme
Copy link
Contributor

dsyme commented Aug 17, 2017

@krauthaufen Could you add a test too please? See src\fsharp\FSharp.Core.Unittests

Copy link
Contributor

@dsyme dsyme left a comment

Choose a reason for hiding this comment

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

requested a test be added

@KevinRansom
Copy link
Contributor

@krauthaufen Hi, thanks for this PR, did you notice Don's comment?

@dsyme
Copy link
Contributor

dsyme commented Oct 4, 2017

@krauthaufen could you add a test for this please? Many thanks

@krauthaufen
Copy link
Contributor Author

Hi, sorry for the late response. i will look into it tomorrow.

@dsyme
Copy link
Contributor

dsyme commented Oct 4, 2017

@krauthaufen Great! See tests\fsharp\core\quotes\test.fsx?

- AddressOf now has a proper type (byref<'a>)
- AddressOf can be used in Expr.Call (was an error)
- calls containing AddressOf can be rebuilt using RebuildShapeCombination
@msftclas
Copy link

msftclas commented Oct 5, 2017

CLA assistant check
All CLA requirements met.

@krauthaufen
Copy link
Contributor Author

@dsyme I just added a few tests checking that AddressOf can now be used as argument to Expr.Call(...), etc.
This was failing due to the exception in typeof.
Couldn't really think of more cases where this change affects anything :-)

@KevinRansom KevinRansom merged commit e5762fd into dotnet:master Oct 17, 2017
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.

6 participants