Skip to content

Overload resolver incorrectly resolves when both 32 and 64-bit parameter type present #868

Description

@BCSharp

If a method group has two methods that only differ in the bit-size of an integer parameter type (e.g. uint and ulong), the wider type overload is not selected, even if the value would require it.

Examples:

>>> import System
>>> System.UIntPtr(0xFFFFFFFFFFFFFFFF)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: Value was either too large or too small for a UInt32.

Also, it seems to prefer double over uint or ulong:

>>> System.Math.Max(0x7FFFFFFF,1)
2147483647
>>> System.Math.Max(0x80000000,1)
2.14748e+09

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions