Opened 14 years ago

Closed 11 years ago

#1373 closed defect (fixed)

Inheritance breaks if the parent has an external declaration

Reported by: sjoelund.se Owned by: sjoelund.se
Priority: high Milestone:
Component: Backend Version:
Keywords: Cc: sjoelund.se

Description

function myacos
  input Real x;
  output Real y;
external "builtin" y=acos(x);
end myacos;
function arccosx = myacos;
function arccosx3
  extends myacos;
end arccosx3;

class A
  import arccosx2 = myacos;
  constant Real x = arccosx(0);
  constant Real x2 = arccosx2(0);
  constant Real x3 = arccosx3(0);
end A;

This will generate arccosx and arccosx3. But they will return random memory ;)

Change History (1)

comment:1 Changed 11 years ago by sjoelund.se

  • Cc changed from sjoelund.se, to sjoelund.se
  • Component set to Backend
  • Resolution set to fixed
  • Status changed from new to closed

This now generates a warning since it usually gives unexpected behaviour (and the spec doesn't allow inheriting external declarations).

Note: See TracTickets for help on using tickets.