From 969cea6a2ffff6c53a615d2fd398f9a7b8c73290 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Mon, 23 Jan 2017 23:13:26 -0800 Subject: Disallow statics of spans and class instance members of span (#9061) Functional fix for #8516 to cover some additional cases. IL tests will be coming later in a separate PR. --- src/dlls/mscorrc/mscorrc.rc | 3 +++ src/dlls/mscorrc/resource.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/dlls') diff --git a/src/dlls/mscorrc/mscorrc.rc b/src/dlls/mscorrc/mscorrc.rc index be9fb1cfa6..138db55b66 100644 --- a/src/dlls/mscorrc/mscorrc.rc +++ b/src/dlls/mscorrc/mscorrc.rc @@ -1230,6 +1230,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, 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, cannot be used as the type for a class instance field." + IDS_CLASSLOAD_BAD_NAME "Type name '%1' from assembly '%2' is invalid." IDS_CLASSLOAD_RANK_TOOLARGE "'%1' from assembly '%2' has too many dimensions." IDS_CLASSLOAD_BAD_MANAGED_RVA "Managed method '%3' on type '%1' from assembly '%2' is not supported." diff --git a/src/dlls/mscorrc/resource.h b/src/dlls/mscorrc/resource.h index 1391a21545..77e937a81e 100644 --- a/src/dlls/mscorrc/resource.h +++ b/src/dlls/mscorrc/resource.h @@ -947,4 +947,5 @@ #define IDS_NATIVE_IMAGE_CANNOT_BE_LOADED_MULTIPLE_TIMES 0x263a - +#define IDS_CLASSLOAD_BYREFLIKE_STATICFIELD 0x263b +#define IDS_CLASSLOAD_BYREFLIKE_NOTVALUECLASSFIELD 0x263c -- cgit v1.2.3