Skip to content

Fix 4240 - MakeTuple on struct tuples - #4387

Merged
KevinRansom merged 2 commits into
dotnet:masterfrom
dsyme:tpfix
Feb 25, 2018
Merged

KevinRansom merged 2 commits into
dotnet:masterfrom
dsyme:tpfix

Conversation

@dsyme

@dsyme dsyme commented Feb 23, 2018

Copy link
Copy Markdown
Contributor

This fixes #4240

It also adds a lot of testing for reflection operations on struct tuples, records and unions. There is only one remaining known issue, which is that PreComputeTuplePropertyInfo doesn't work for struct tuples. This is because no .NET metadata properties actually exist for struct tuples. We would need to add a separate PreComputeTupleFieldInfo but I'm not entirely sure it's worth it - at least it's a micro addition that any user of .NET reflection can easily implement themselves.

@dsyme

dsyme commented Feb 24, 2018 •

Copy link
Copy Markdown
Contributor Author

This is ready. It's a very simple fix as predicted by @eiriktsarpalis

@KevinRansom

Copy link
Copy Markdown
Contributor

I also put together a fix for this, but noticed that the coreclr testing is busted. The failure isn't due to this PR. but ...

from your pr's ci_part3.

w\release_ci_pa---c6929ad7\Tools\dotnetcli\dotnet.exe" "D:\j\w\release_ci_pa---c6929ad7\tests\testbin\release\coreclr\FSharp.Core.UnitTests\FSharp.Core.UnitTests.dll" 
NUnitLite 3.5.0 (Portable)
Copyright (C) 2016 Charlie Poole

Test Files
    D:\j\w\release_ci_pa---c6929ad7\tests\testbin\release\coreclr\FSharp.Core.UnitTests\FSharp.Core.UnitTests.dll

Errors and Failures

1) Invalid : FSharp.Core.UnitTests, Version=4.4.1.0, Culture=neutral, PublicKeyToken=null
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Run Settings
    Internal Trace: Off

Test Run Summary
  Overall result: Failed
  Test Count: 0, Passed: 0, Failed: 0, Inconclusive: 0, Skipped: 0
  Start time: 2018-02-24 00:16:46Z
    End time: 2018-02-24 00:16:46Z
    Duration: 0.013 seconds

@KevinRansom
KevinRansom merged commit 44ef814 into dotnet:master Feb 25, 2018
T-Gro pushed a commit that referenced this pull request Jun 12, 2026
* Fix 4240 - MakeTuple on struct tuples

* fix this mistake
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.

FSharp.Reflection.FSharpValue.MakeTuple broken for value tuples

2 participants