Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Enum.IsDefined does not work in reflection-free mode #8216

Closed
Thealexbarney opened this issue Jun 27, 2020 · 1 comment
Closed

Enum.IsDefined does not work in reflection-free mode #8216

Thealexbarney opened this issue Jun 27, 2020 · 1 comment

Comments

@Thealexbarney
Copy link

Enum.IsDefined doesn't work in reflection-mode. This means that some APIs like Environment.GetFolderPath don't work.

A quick look in a debugger shows that the EnumInfo passed to GetEnumName has an empty Values array.

@MichalStrehovsky
Copy link
Member

Enum APIs don't currently work: https://github.com/dotnet/corert/blob/master/Documentation/using-corert/reflection-free-mode.md#reflection-apis-that-are-up-for-discussion

I would like to fix that for the next incarnation of the reflection free mode that would make type metadata available, but still not allow reflection on fields and methods. It's likely such mode would be more practical. The current reflection-free mode (where nothing works) was just much cheaper to bring up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants