Opened 10 years ago

Closed 10 years ago

#2968 closed defect (fixed)

Function pointers are not checked for being assigned before use

Reported by: perost Owned by: sjoelund.se
Priority: high Milestone: 1.9.2
Component: MetaModelica Version: trunk
Keywords: Cc:

Description

This function currently segfaults without any error from the compiler:

function test
  output Integer n;

protected
  partial function func
    output Integer n;
  end func;

  func f; // <- Not assigned!
algorithm
  n := f();
end test;

Change History (2)

comment:1 Changed 10 years ago by sjoelund.se

Fixed in r23252.

comment:2 Changed 10 years ago by sjoelund.se

  • Milestone changed from Future to 1.9.2
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.