Package undefined in package body

In a file with a package declaration followed by package body, the package name remains undefined in the body.

eg.

package my_pkg is
...
end package my_pkg;
 
package body my_pkg is
  function my_function ... is
  begin
    assert (test)
        report my_pkg'instance_name -- ERROR "Declaration of my_pkg could not be found"
        severity error;
  end function my_function;

I'm not sure if this is an open ticket, but I couldn't find any references to this in the user forum.

Cheers,
Adam Lynch
Monash University

ticket:131

This is indeed a bug in the scoping rules of our analyzer. It also goes wrong in following example:

entity ticket131 is   
  attribute myAttribute of ticket131 : entity is TRUE; --entity should be visible
end ticket131;

Thanks,
Hendrik.

update

ticket:131 was fixed in October 2010.

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.