Euphoria Ticket #910: OpenEuphoria error states private routines as 'not declared' instead of 'not visible'

I declared a routine foo() in the file my_include.e.

procedure foo() 
   -- blah blah 
end procedure 

and then included the routine in my code in my main program file, my_program.exw:

include "my_include.e" as my_include 
my_include:foo() 

The error I got was:

<0074>:: Errors resolving the following references:  
    'foo' (my_program.exw:11) was not declared in 'my_include.e'.  

This error message is misleading, because foo is declared in my_include.e. The issue is that the routine is not visible, because by default it is private.

A more correct error message would indicate that the routine was declared, but is not visible, such as:

'foo' (my_program.exw:11) was declared but not visible (global or public) in 'my_include.e'.  

This obviously deals with other sorts of declarations as well (for example, constant is by default private).

Details

Type: Bug Report Severity: Textual Category: Error Reporting
Assigned To: SDPringle Status: Accepted Reported Release:
Fixed in SVN #: View VCS: none Milestone:

1. Comment by SDPringle Oct 07, 2018

It is too much for the interpreter to check to see if there is a local symbol in the file that is not exported. The error message could instead include the possibility like 'not declared in my_include.e or not visible'

Search



Quick Links

User menu

Not signed in.

Misc Menu