summaryrefslogtreecommitdiff
path: root/src/dlls/mscorrc
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-11-03 16:14:10 -0700
committerGitHub <noreply@github.com>2018-11-03 16:14:10 -0700
commitf2d56a9b2b5737ab04d322f03404b9faef9e5293 (patch)
tree46c71896b8f834d890d4037051c5ffa8c8f31cfa /src/dlls/mscorrc
parent1e68cab53a2855d7733ca230efad1be99bd471e2 (diff)
downloadcoreclr-f2d56a9b2b5737ab04d322f03404b9faef9e5293.tar.gz
coreclr-f2d56a9b2b5737ab04d322f03404b9faef9e5293.tar.bz2
coreclr-f2d56a9b2b5737ab04d322f03404b9faef9e5293.zip
Improve error messages for byref-like type loading errors (#20789)
Related to dotnet/corefx#33233
Diffstat (limited to 'src/dlls/mscorrc')
-rw-r--r--src/dlls/mscorrc/mscorrc.rc8
-rw-r--r--src/dlls/mscorrc/resource.h7
2 files changed, 7 insertions, 8 deletions
diff --git a/src/dlls/mscorrc/mscorrc.rc b/src/dlls/mscorrc/mscorrc.rc
index 5c5c534a23..0e35c29061 100644
--- a/src/dlls/mscorrc/mscorrc.rc
+++ b/src/dlls/mscorrc/mscorrc.rc
@@ -712,7 +712,6 @@ BEGIN
IDS_CLASSLOAD_VARIANCE_IN_CONSTRAINT "Could not load type '%1' from assembly '%2' because a covariant or contravariant type parameter was used illegally in a type parameter constraint in method '%3'."
IDS_CLASSLOAD_VARIANCE_CLASS "Could not load type '%1' from assembly '%2' because it declares a covariant or contravariant type parameter and is not an interface or delegate."
IDS_CLASSLOAD_BADVARIANCE "Could not load type '%1' from assembly '%2' because it uses an illegal variance annotation on a type parameter."
- IDS_CLASSLOAD_CONTEXT_BOUND_GENERIC_METHOD "Context-bound objects with generic methods are not supported."
IDS_CLASSLOAD_ENUM_EXTRA_GENERIC_TYPE_PARAM "Enumerated types cannot have any generic type parameters, beyond any inherited from their enclosing type (for nested enums)."
IDS_CLASSLOAD_GENERICTYPE_RECURSIVE "Could not load type '%1' from assembly '%2' because it has recursive generic definition."
IDS_CLASSLOAD_TOOMANYGENERICARGS "Could not load type '%1' from assembly '%2'. Internal limitation: Too many generic arguments."
@@ -721,7 +720,8 @@ BEGIN
IDS_CLASSLOAD_TYPESPEC "Could not load TypeSpec from assembly '%2'."
IDS_CLASSLOAD_SEALEDPARENT "Could not load type '%1' from assembly '%2' because the parent type is sealed."
IDS_CLASSLOAD_BADFORMAT "Could not load type '%1' from assembly '%2' because the format is invalid."
- IDS_CLASSLOAD_CANTCREATEARRAYCLASS "Could not create array type '%1' from assembly '%2'."
+ IDS_CLASSLOAD_BYREFARRAY "Could not create array type '%1' from assembly '%2' because the element type is ByRef."
+ IDS_CLASSLOAD_BYREFLIKEARRAY "Could not create array type '%1' from assembly '%2' because the element type is ByRef-like."
IDS_CLASSLOAD_MISSINGMETHOD "Could not load type '%1' from assembly '%2' because the method '%3' could not be loaded."
IDS_CLASSLOAD_FIELDTOOLARGE "Size of field of type '%1' from assembly '%2' is too large."
IDS_CLASSLOAD_CANTEXTEND "Type '%1' from assembly '%2' cannot extend from any other type."
@@ -740,8 +740,8 @@ 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 ByRef-like type cannot be used as the type for a static field."
+ IDS_CLASSLOAD_BYREFLIKE_INSTANCEFIELD "A ByRef-like type cannot be used as the type for an instance field in a non-ByRef-like type."
IDS_CLASSLOAD_RANK_TOOLARGE "'%1' from assembly '%2' has too many dimensions."
IDS_CLASSLOAD_BAD_UNMANAGED_RVA "Native 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 555ee4cfac..512b22e7de 100644
--- a/src/dlls/mscorrc/resource.h
+++ b/src/dlls/mscorrc/resource.h
@@ -189,7 +189,8 @@
#define IDS_CLASSLOAD_GENERAL 0x80131522
#define IDS_CLASSLOAD_BADFORMAT 0x1774
-#define IDS_CLASSLOAD_CANTCREATEARRAYCLASS 0x1775
+#define IDS_CLASSLOAD_BYREFARRAY 0x1775
+#define IDS_CLASSLOAD_BYREFLIKEARRAY 0x1776
#define IDS_CLASSLOAD_MISSINGMETHOD 0x1777
#define IDS_CLASSLOAD_STATICVIRTUAL 0x1778
#define IDS_CLASSLOAD_REDUCEACCESS 0x1779
@@ -569,7 +570,6 @@
#define IDS_EE_TOOMANYFIELDS 0x2072
#define IDS_EE_NDIRECT_GETPROCADDRESS_NONAME 0x2073
-#define IDS_CLASSLOAD_CONTEXT_BOUND_GENERIC_METHOD 0x2075
#define IDS_EE_CLASS_CONSTRAINTS_VIOLATION 0x2076
#define IDS_EE_METHOD_CONSTRAINTS_VIOLATION 0x2077
#define IDS_CLASSLOAD_TOO_MANY_METHODS 0x2078
@@ -709,8 +709,7 @@
#define IDS_NATIVE_IMAGE_CANNOT_BE_LOADED_MULTIPLE_TIMES 0x263a
#define IDS_CLASSLOAD_BYREFLIKE_STATICFIELD 0x263b
-#define IDS_CLASSLOAD_BYREFLIKE_NOTVALUECLASSFIELD 0x263c
-#define IDS_CLASSLOAD_NOTBYREFLIKE 0x263d
+#define IDS_CLASSLOAD_BYREFLIKE_INSTANCEFIELD 0x263c
#define IDS_EE_NDIRECT_LOADLIB_LINUX 0x263e
#define IDS_EE_NDIRECT_LOADLIB_MAC 0x263f
#define IDS_EE_NDIRECT_GETPROCADDRESS_UNIX 0x2640