Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1479: Unable to cast object of type 'System.Int32' to type 'Syst…
…em.Single'
- Loading branch information
1 parent
b31d922
commit 3abb548
Showing
5 changed files
with
89 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ConstantBlobs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty | ||
{ | ||
internal class ConstantBlobs | ||
{ | ||
public static void Float_Int32(float f1 = 0f, float f2 = -1f, float f3 = int.MaxValue, float f4 = int.MinValue) | ||
{ | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ConstantBlobs.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Metadata version: v4.0.30319 | ||
.assembly extern mscorlib | ||
{ | ||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. | ||
.ver 4:0:0:0 | ||
} | ||
.assembly ConstantBlobs | ||
{ | ||
.ver 1:0:0:0 | ||
} | ||
.module ConstantBlobs.exe | ||
// MVID: {B973FCD6-A9C4-48A9-8291-26DDC248E208} | ||
.imagebase 0x00400000 | ||
.file alignment 0x00000200 | ||
.stackreserve 0x00100000 | ||
.subsystem 0x0003 // WINDOWS_CUI | ||
.corflags 0x00020003 // ILONLY 32BITPREFERRED | ||
// Image base: 0x000001C4B6C90000 | ||
|
||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ConstantBlobs | ||
extends [mscorlib]System.Object | ||
{ | ||
.method public hidebysig static void Float_Int32( | ||
[opt] float32 f1, | ||
[opt] float32 f2, | ||
[opt] float32 f3, | ||
[opt] float32 f4 | ||
) cil managed | ||
{ | ||
.param [1] = int32(0) | ||
.param [2] = int32(-1) | ||
.param [3] = int32(2147483647) | ||
.param [4] = int32(-2147483648) | ||
|
||
// Code size 1 (0x1) | ||
.maxstack 8 | ||
IL_0000: ret | ||
} // end of method Program::Float_Int32 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters