silver icon indicating copy to clipboard operation
silver copied to clipboard

Ambiguous short names should indicate precisely where the ambiguous names are defined.

Open ericvanwyk opened this issue 4 years ago • 0 comments

When a name conflicts with an imported name it would be helpful if the error message said from where the conflicting name was being imported. In the example below the message just says that the locally defined name is shared with one from "an imported grammar". Can we name that grammar? In this case the conflicting name come from core. I don't think that import core with id as foo even works. Can we import core with different names?

AbstractSyntax.sv:66:0: error: Production id shares a name with another production 
from an imported grammar. Either this production is meant to be an aspect, or you 
should use 'import ... with id as ...' to change the other production's apparent name.

ericvanwyk avatar Feb 19 '21 02:02 ericvanwyk