Skip to content

Commit

Permalink
Crashes on running the boring.il test from coreclr, the problem was t…
Browse files Browse the repository at this point in the history
…hat using [System.Runtime]System.String the type was not understood as the primitive type string. Using ilasm from coreclr and running on mono it works, because of that I decided to fix on ilasm and not on runtime.

Fixes mono#13923
  • Loading branch information
thaystg authored and monojenkins committed Jul 8, 2019
1 parent 08dd988 commit 9189c94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mcs/ilasm/codegen/GenericArguments.cs
Expand Up @@ -40,7 +40,11 @@ public void Add (BaseTypeRef type)

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;
}
Expand Down
2 changes: 2 additions & 0 deletions mcs/ilasm/codegen/PrimitiveTypeRef.cs
Expand Up @@ -64,7 +64,9 @@ public static PrimitiveTypeRef GetPrimitiveType (string full_name)
{
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:
Expand Down

0 comments on commit 9189c94

Please sign in to comment.