incubator-etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Dixson <jadix...@cisco.com>
Subject Re: [vote]: (ETCH-27) mixins cause trouble when two or more mixed in files define a type with the same name.
Date Fri, 23 Jan 2009 14:58:19 GMT
+1


On 1/22/09 2:21 PM, "Scott Comer (sccomer)" <sccomer@cisco.com> wrote:

> [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.
> 
> 
> 
> 
> 

-- 
James Dixson
Manager, Software Development
CUAE Engineering, Cisco Systems
(e) jadixson@cisco.com
(p) 512-336-3305
(m) 512-968-2116



Mime
View raw message