-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: %X format: an integer is required, not float #983
Comments
interesting, do we need a few feature for "float"? or do we put floats into the existing "number" feature? the latter seems more readable/easier, but a bit more tricky for our code to track int vs float. but i think this is quite doable. |
dncil emits float typed constants for // Token: 0x06000006 RID: 6 RVA: 0x0000249C File Offset: 0x0000069C
.method private hidebysig
instance void InitializeComponent () cil managed
{
// Header Size: 12 bytes
// Code Size: 103 (0x67) bytes
.maxstack 3
/* 0x000006A8 02 */ IL_0000: ldarg.0
/* 0x000006A9 283100000A */ IL_0001: call instance void [System.Windows.Forms]System.Windows.Forms.Control::SuspendLayout()
/* 0x000006AE 02 */ IL_0006: ldarg.0
/* 0x000006AF 220000C040 */ IL_0007: ldc.r4 6
/* 0x000006B4 2200005041 */ IL_000C: ldc.r4 13
/* 0x000006B9 733200000A */ IL_0011: newobj instance void [System.Drawing]System.Drawing.SizeF::.ctor(float32, float32)
/* 0x000006BE 283300000A */ IL_0016: call instance void [System.Windows.Forms]System.Windows.Forms.ContainerControl::set_AutoScaleDimensions(valuetype [System.Drawing]
... |
|
in theory we could be extracting floats from intel code today, but we just dont for no good reason except lack of interest. |
I vote we group |
but unsure how/if this complicates the matching engine. |
i dont think it will make matching hard, just a matter of keeping the types straight throughout the codebase. its a good opportunity to update our type annotations. |
I'd say just cast to an |
I don't believe the matching engine changes, assuming we're not considering 0 to be the same as 0.0 (different types). I had updated the type annotations in #986 and mypy is happy, so I think its a pretty trivial change to add support here. Lets add a test case to demonstrate the functionality, and if that works, support floats. If not, we can invest time in this later. |
The text was updated successfully, but these errors were encountered: