Boo

Calling method with nullable parameter generates invalid IL

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.8.2, 0.9
  • Fix Version/s: 0.9
  • Component/s: Compiler
  • Labels:
    None
  • Number of attachments :
    0

Description

This program causes booc to generate invalid IL:
def X(i as int?):
print i
X(42)

Generated IL:
...
L_001d: ldc.i4 42
L_0022: call void ProgramModule::X(valuetype [mscorlib]System.Nullable`1<int32>)

PEVerify output:
[IL]: Error: [C:\temp\test.exe :ProgramModule::Main][offset 0x00000022][found Int32][expected value 'System.Nullable`1[System.Int32]'] Unexpected type on the stack.

Activity

Hide
Cedric Vivier added a comment -

Fixed in rev. 3099

Show
Cedric Vivier added a comment - Fixed in rev. 3099

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: