diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-01-05 14:44:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 14:44:18 -0800 |
commit | 6c12105bb8cc1821ba5d5c3d36aad609a44308e0 (patch) | |
tree | 408da7569d779ca1dc1e70fe812155a18848774c /src/dlls/mscorrc | |
parent | 7a785420a57925d1ea67fa9361e1f826a7e74f2b (diff) | |
download | coreclr-6c12105bb8cc1821ba5d5c3d36aad609a44308e0.tar.gz coreclr-6c12105bb8cc1821ba5d5c3d36aad609a44308e0.tar.bz2 coreclr-6c12105bb8cc1821ba5d5c3d36aad609a44308e0.zip |
Detect ByRefLike types using attribute (#15745)
* Detect ByRefLike types using attribute and improve error messages for their invalid use
Fixes #11371 and #15458
Diffstat (limited to 'src/dlls/mscorrc')
-rw-r--r-- | src/dlls/mscorrc/mscorrc.rc | 5 | ||||
-rw-r--r-- | src/dlls/mscorrc/resource.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/dlls/mscorrc/mscorrc.rc b/src/dlls/mscorrc/mscorrc.rc index bbf5a296c0..1f2423b69c 100644 --- a/src/dlls/mscorrc/mscorrc.rc +++ b/src/dlls/mscorrc/mscorrc.rc @@ -1223,8 +1223,9 @@ BEGIN IDS_CLASSLOAD_NOTINTERFACE "Could not load type '%1' from assembly '%2' because it attempts to implement a class as an interface." IDS_CLASSLOAD_VALUEINSTANCEFIELD "Could not load the value type '%1' from assembly '%2' because it has an instance field of itself." - IDS_CLASSLOAD_BYREFLIKE_STATICFIELD "A value type containing a by-ref instance field, such as Span<T>, cannot be used as the type for a static field." - IDS_CLASSLOAD_BYREFLIKE_NOTVALUECLASSFIELD "A value type containing a by-ref instance field, such as Span<T>, cannot be used as the type for a class instance field." + IDS_CLASSLOAD_BYREFLIKE_STATICFIELD "A value type containing a ByRef-like instance field cannot be used as the type for a static field." + IDS_CLASSLOAD_BYREFLIKE_NOTVALUECLASSFIELD "A value type containing a ByRef-like instance field cannot be used as the type for a class instance field." + IDS_CLASSLOAD_NOTBYREFLIKE "A value type containing a ByRef-like instance field must be ByRef-like type." IDS_CLASSLOAD_BAD_NAME "Type name '%1' from assembly '%2' is invalid." IDS_CLASSLOAD_RANK_TOOLARGE "'%1' from assembly '%2' has too many dimensions." diff --git a/src/dlls/mscorrc/resource.h b/src/dlls/mscorrc/resource.h index 053b1b4e17..45ddd2ec82 100644 --- a/src/dlls/mscorrc/resource.h +++ b/src/dlls/mscorrc/resource.h @@ -893,3 +893,4 @@ #define IDS_CLASSLOAD_BYREFLIKE_STATICFIELD 0x263b #define IDS_CLASSLOAD_BYREFLIKE_NOTVALUECLASSFIELD 0x263c +#define IDS_CLASSLOAD_NOTBYREFLIKE 0x263d |