apoch / epoch-language

Home of the Epoch Programming Language Project
Other
72 stars 3 forks source link

Flattening variable scopes can cause duplicate identifier collisions #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With the introduction of flattened lexical scopes, the following will vomit:

entrypoint :
{
    if(1 == 2)
    {
        integer foo = 42
    }
    else
    {
        integer foo = 666
    }
}

The compiler will accept this but emit a binary bytecode blob that the VM 
cannot handle. We should introduce deduplication logic during the flattening 
process since we guarantee at compile time that the identifiers will never 
shadow.

Original issue reported on code.google.com by don.ap...@gmail.com on 5 Jan 2013 at 5:54

GoogleCodeExporter commented 9 years ago
This has been fixed for a while but I forgot to update the bug.

Original comment by don.ap...@gmail.com on 11 Apr 2013 at 6:00