Euphoria Ticket #939: routine_id used as default argument doesn't see forward reference

-- bug.ex 
include bug.e 
 
-- bug.e 
 
include std/dll.e 
 
function callback(sequence name, integer rid = routine_id(name)) 
    if rid = -1 then 
        puts(2, "routine '"&name&"' is not visible\n") 
    end if 
    return call_back(rid) 
end function 
 
? callback("foo") 
 
function foo() 
    return 0 
end function 

When translated and run, the output "routine 'foo' is not visible" is printed. With "euc -keep", the init-.c file doesn't have "foo" in the routine id array.

Details

Type: Bug Report Severity: Major Category: Translator
Assigned To: unknown Status: New Reported Release: 4.1.0 development (5861:571791
Fixed in SVN #: View VCS: none Milestone:

Search



Quick Links

User menu

Not signed in.

Misc Menu