incubator-etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scott comer <scco...@cisco.com>
Subject [vote]: (ETCH-27) mixins cause trouble when two or more mixed in files define a type with the same name.
Date Thu, 22 Jan 2009 20:21:00 GMT
[no discussion, time to vote. 48 hrs. -scott]

https://issues.apache.org/jira/browse/ETCH-27

i want to include this fix in release 1.0.2.

wei found this bug on friday. consider these etch files:

-------------
module foo
service Foo
{
    mixin Bar
    mixin Baz
}
-------------

-------------
module bar
service Bar
{
    struct Entry( int x )
    void barGet( Entry e )
}
-------------

-------------
module baz
service Baz
{
    struct Entry( int x )
    void bazGet( Entry e )
}
-------------

this should be good, because bazGet should refer to its own Entry and
barGet to its own, too. but the compiler started the name search for
Entry in barGet at the top of the module tree (Foo) instead of in Bar.
by starting at the top, it found two Entry definitions, bar.Entry and
baz.Entry. not being able to distinguish between them, it declares them
ambiguous and ultimately fails.

rather, when barGet is being compiled, the search for Entry should start
with Bar. in the name checking section of the compiler it already does
just that. this fix just fixes name resolution in Compiler.java to work
the same way.






Mime
View raw message