Skip to content

[mono] Support RuntimeType.MakeGenericType with non-RuntimeType elements#58014

Merged
lewing merged 1 commit into
dotnet:mainfrom
uweigand:mono-runtimetype
Aug 27, 2021
Merged

[mono] Support RuntimeType.MakeGenericType with non-RuntimeType elements#58014
lewing merged 1 commit into
dotnet:mainfrom
uweigand:mono-runtimetype

Conversation

@uweigand

Copy link
Copy Markdown
Contributor

@uweigand uweigand requested a review from marek-safar as a code owner August 24, 2021 13:02
@ghost ghost added community-contribution Indicates that the PR has been added by a community member area-CoreLib-mono labels Aug 24, 2021
@jkotas

jkotas commented Aug 24, 2021

Copy link
Copy Markdown
Member

Do we need to add test?

@lewing

lewing commented Aug 24, 2021

Copy link
Copy Markdown
Member

runtime (Libraries Test Run release mono Linux arm64 Debug) hit #57941

@SamMonoRT

Copy link
Copy Markdown
Member

@uweigand - can we get a test added for the change ?

@uweigand

Copy link
Copy Markdown
Contributor Author

Added test case. The test fails on Mono without this patch and passes with it. In any case it passes with CoreCLR.

If there is a more straightforward way to create a non-RuntimeType type, I'd appreciate any suggestions ...

@jkotas

jkotas commented Aug 27, 2021

Copy link
Copy Markdown
Member

If there is a more straightforward way to create a non-RuntimeType type

I think new MockType() should work.

Or include Common\tests\System\NonRuntimeType.cs in the project and use new NonRuntimeType().

@uweigand

uweigand commented Aug 27, 2021

Copy link
Copy Markdown
Contributor Author

If there is a more straightforward way to create a non-RuntimeType type

I think new MockType() should work.

Or include Common\tests\System\NonRuntimeType.cs in the project and use new NonRuntimeType().

Thanks for the pointers! While investigating those, I found Helpers.NonRuntimeTypes which is already used in similar tests, so I used this here as well.

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@marek-safar

Copy link
Copy Markdown
Contributor

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1174964346

@lewing lewing merged commit 510f63e into dotnet:main Aug 27, 2021
@uweigand uweigand deleted the mono-runtimetype branch August 30, 2021 07:47
@ghost ghost locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mono] RuntimeType.MakeGenericType with non-RuntimeType elements not supported

6 participants