From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 2 Oct 92 18:35:52 GMT From: sun-barr!west.West.Sun.COM!cronkite.Central.Sun.COM!texsun!yorktown!young @ames.arc.nasa.gov (Mark Young) Subject: Generic Package Visibility Problems! (help) Message-ID: List-Id: I am having visibility problems with generic packages. Here's an example: file #1 ----------------------------------------------- generic Generic_Parameter : Generic_Parameter_Type; package Color is type RGB_Type is (RED,GREEN,BLUE); function Get_Color return RGB_Type; end Color; ---------------------------------------------- file #2 ---------------------------------------------- with Color; package Caller is package C_1 is new Caller( Generic_Argument ); procedure Test_Color; end Caller; package body Caller is procedure Test_Color is separate; end Caller; --------------------------------------------- file #3 --------------------------------------------- separate( Caller ) procedure Test_Color is begin if ( C_1.Get_Color = C_1.RED ) then ------- null; end if; end Test_Color; ---------------------------------------------- This will not work. For some reason the compiler cannot resolve C_1.RED. It tells me that = is not a legal operation, that C_1.Get_Color returns type RGB_Type but, that it does not understand C_1.RED and that perhaps I needed a "use" clause in the body of Caller. I don't understand this. My understanding of Ada scoping would lead me to believe that this is correct. Am I missing something? BTW: this is not a complete example, it is only to illustrate a point. Thanks, Mark Young