Attached is IR 2120. Although this issue is currently pretty esoteric, when we extend protected types to classes we will need some way to solve this kind of reference. Chuck Swart -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. VHDL Issue Number: 2120 Language_Version VHDL-2002 Classification Language Modeling Enhancement or Deficiency Summary How to access objects in higher level nested protected type Relevant_LRM_Sections 3.5 Protected types 6.3 Selected names Related_Issues Key_Words_and_Phrases Authors_Name James Unterburger Authors_Phone_Number 503-685-0860 Authors_Fax_Number Authors_Email_Address jamesu@model.com Authors_Affiliation Mentor Graphics Authors_Address1 8005 SW Boeckman Rd Authors_Address2 Wilsonville, OR 97070 Authors_Address3 Current Status: Submitted Superseded By: ------------------------ Date Submitted: 22 August 2007 Date Analyzed: Author of Analysis: Revision Number: 0 Date Last Revised: Description of Problem ---------------------- The rules for selected names do not allow a prefix that is a type mark; when the prefix is an object of a protected type, the suffix must be the name of a method of that protected type. For nested protected types, in which an inner protected type body appearing within an outer protected type body (after the corresponding inner protected type declaration, of course) contains a declarative item with the same identifier as a declarative item appearing in the outer protected type body (declared prior to the appearance of the inner protected type body), it is impossible to refer to the outer protected type body's declarative item. type outer is protected end protected outer; type outer is protected body constant c : string := "Hello"; type inner is protected end protected inner; type inner is protected body -- this should work, "c" is still string here constant c : natural := c'length; -- won't work because how to get outer's c? -- "c" now means the natural, but selected -- name is illegal constant c1 : string := outer.c & " inner"; end protected body inner; end protected body outer; Proposed Resolution ------------------- Perhaps allow type mark prefix of selected name in this scenario. There may be other uses too, as in record_type_mark.record_element_name'left for example. VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBDReceived on Wed Aug 22 12:39:56 2007
This archive was generated by hypermail 2.1.8 : Wed Aug 22 2007 - 12:39:59 PDT