Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/ilasm
diff options
context:
space:
mode:
authorThays Grazia <thaystg@gmail.com>2019-07-08 16:22:19 +0300
committerGitHub <noreply@github.com>2019-07-08 16:22:19 +0300
commitebebfe263ba396f176efb92ecd25f01ea6592e08 (patch)
tree12ee34d5e78301f0eaefa049816342ef6b13a514 /mcs/ilasm
parentcb330378cfc86555e559b0fb0539d27a337ad987 (diff)
Crashes on running the boring.il test from coreclr, the problem was that using [System.Runtime]System.String the type was not understood as the primitive type string. (#15552)
Using ilasm from coreclr and running on mono it works, because of that I decided to fix on ilasm and not on runtime. Fixes #13923
Diffstat (limited to 'mcs/ilasm')
-rw-r--r--mcs/ilasm/codegen/GenericArguments.cs6
-rw-r--r--mcs/ilasm/codegen/PrimitiveTypeRef.cs2
2 files changed, 7 insertions, 1 deletions
diff --git a/mcs/ilasm/codegen/GenericArguments.cs b/mcs/ilasm/codegen/GenericArguments.cs
index afefa395848..db098d44423 100644
--- a/mcs/ilasm/codegen/GenericArguments.cs
+++ b/mcs/ilasm/codegen/GenericArguments.cs
@@ -40,7 +40,11 @@ namespace Mono.ILASM {
if (type_list == null)
type_list = new ArrayList ();
- type_list.Add (type);
+ var prim = PrimitiveTypeRef.GetPrimitiveType (type.FullName);
+ if (prim != null)
+ type_list.Add (prim);
+ else
+ type_list.Add (type);
type_str = null;
type_arr = null;
}
diff --git a/mcs/ilasm/codegen/PrimitiveTypeRef.cs b/mcs/ilasm/codegen/PrimitiveTypeRef.cs
index 40a52290355..48236f0693f 100644
--- a/mcs/ilasm/codegen/PrimitiveTypeRef.cs
+++ b/mcs/ilasm/codegen/PrimitiveTypeRef.cs
@@ -64,7 +64,9 @@ namespace Mono.ILASM {
{
switch (full_name) {
case "System.String":
+ case "[System.Runtime]System.String":
return new PrimitiveTypeRef (PEAPI.PrimitiveType.String, full_name);
+ case "[System.Runtime]System.Object":
case "System.Object":
return new PrimitiveTypeRef (PEAPI.PrimitiveType.Object, full_name);
default: