Skip to content

Conversation

@TIHan
Copy link
Contributor

@TIHan TIHan commented Jan 20, 2020

Should resolve this: davidfowl/BedrockFramework#48

Fix was easy, hardest part was making the test.
When importing an ILType when creating a TSlotParam, we didn't take into account the attributes, which there is a specific function for that. The attributes will dictate what kind of type we have, such as a byref parameter type with a ReadOnlyAttribute; turns into inref.

Comment on lines +271 to +277
| TestCompilationReference (cmpl) ->
let tmp = Path.GetTempFileName()
disposals.Add({ new IDisposable with
member _.Dispose() =
try File.Delete tmp with | _ -> () })
cmpl.EmitAsFile tmp
(([||], tmp), []), false)
Copy link
Contributor

Choose a reason for hiding this comment

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

I take it this was just leaving stuff around?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is all new, so nothing was being left around before. But yes, once I create a tmp file, I need to make sure we always try to delete it on dispose.

Comment on lines +59 to +60
type CompilationReference =
private
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: type private is more idiomatic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

type private makes the whole type private which is not what I want. I only want to make the union cases private to the module.

Copy link
Contributor

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

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

Nice.

@KevinRansom KevinRansom merged commit a373efb into dotnet:master Jan 21, 2020
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* Added inref interop test

* Fixed inref interop when creating a slot sig

* 3.1 to 3.0
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.

3 participants