Fix unsigned methodCallSuffixForType #4

Merged
1 commit merged into from Nov 18, 2010

Conversation

Projects
None yet
2 participants
Contributor

wadey commented Nov 18, 2010

Before this fix, here are the type mappings:

binding:  Byte  ->  UInt8
binding:  Char  ->  Int8
binding:  UChar  ->  Int8
binding:  Short  ->  Int16
binding:  UShort  ->  Int16
binding:  Int  ->  Int32
binding:  UInt  ->  Int32
binding:  Long  ->  Int64
binding:  ULong  ->  Int64
binding:  LongLong  ->  Int64
binding:  ULongLong  ->  Int64

And after the fix:

binding:  Byte  ->  UInt8
binding:  Char  ->  Int8
binding:  UChar  ->  UInt8
binding:  Short  ->  Int16
binding:  UShort  ->  UInt16
binding:  Int  ->  Int32
binding:  UInt  ->  UInt32
binding:  Long  ->  Int64
binding:  ULong  ->  UInt64
binding:  LongLong  ->  Int64
binding:  ULongLong  ->  UInt64
Contributor

rbranson commented Nov 18, 2010

Nice catch, I'm writing some tests to catch this, as well as adding some bounds checking in the Pointer code to check for it. Honestly, at this point the type system is a giant monolithic hack and I've got some ideas for improving it. The limits of it are starting to get exposed with using Struct, especially nested Structs.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment