Skip to content
Permalink
Browse files

Merge pull request #80 from disks86/master

CosmosOS Comparer Issue #584
  • Loading branch information...
charlesbetros committed Jun 5, 2019
2 parents 01ba26b + d8b22c7 commit 7f761df441571169bd1b53fd9e901d681b952b89
Showing with 6 additions and 12 deletions.
  1. +6 −12 source/Cosmos.IL2CPU/ILOpCodes/OpBranch.cs
@@ -176,18 +176,12 @@ protected override void DoInterpretStackTypes(ref bool aSituationChanged)
|| (xValue1 == typeof(bool) && xValue2 == typeof(int))) || (xValue1 == typeof(bool) && xValue2 == typeof(int)))
{ {
return; return;
} }


if (xValue1.IsClass && if ((xValue1.IsClass || xValue1.IsInterface)
xValue2.IsClass) && (xValue2.IsClass || xValue2.IsInterface))
{ {
return; return;
}

if (xValue1.IsInterface && xValue1.IsAssignableFrom(xValue2) ||
xValue2.IsInterface && xValue2.IsAssignableFrom(xValue1))
{
return;
} }


throw new Exception(String.Format("Comparing types '{0}' and '{1}' not supported!", xValue1.AssemblyQualifiedName, xValue2.AssemblyQualifiedName)); throw new Exception(String.Format("Comparing types '{0}' and '{1}' not supported!", xValue1.AssemblyQualifiedName, xValue2.AssemblyQualifiedName));

0 comments on commit 7f761df

Please sign in to comment.
You can’t perform that action at this time.