Skip to content

Commit

Permalink
add Double to StackValueKind enum (dotnet#5011)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonerdo committed Sep 4, 2018
1 parent 0dc4175 commit d7cc694
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Common/src/TypeSystem/IL/ILImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ internal enum StackValueKind
NativeInt,
/// <summary>Any float value.</summary>
Float,
/// <summary>Any double value.</summary>
Double,
/// <summary>A managed pointer.</summary>
ByRef,
/// <summary>An object reference.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ private void ImportReturn()
case TypeFlags.FunctionPointer:
case TypeFlags.GenericParameter:
default:
// TODO: Support more complex return types
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public float AsFloat()

public static StackItem FromDouble(double d)
{
return new StackItem { _double = d, _kind = StackValueKind.Float };
return new StackItem { _double = d, _kind = StackValueKind.Double };
}

public double AsDouble()
Expand Down

0 comments on commit d7cc694

Please sign in to comment.