Return-Path: Delivered-To: apmail-incubator-etch-dev-archive@locus.apache.org Received: (qmail 55714 invoked from network); 22 Jan 2009 20:21:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jan 2009 20:21:32 -0000 Received: (qmail 82093 invoked by uid 500); 22 Jan 2009 20:21:32 -0000 Delivered-To: apmail-incubator-etch-dev-archive@incubator.apache.org Received: (qmail 82075 invoked by uid 500); 22 Jan 2009 20:21:32 -0000 Mailing-List: contact etch-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: etch-dev@incubator.apache.org Delivered-To: mailing list etch-dev@incubator.apache.org Received: (qmail 82042 invoked by uid 99); 22 Jan 2009 20:21:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jan 2009 12:21:32 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sccomer@cisco.com designates 171.71.176.71 as permitted sender) Received: from [171.71.176.71] (HELO sj-iport-2.cisco.com) (171.71.176.71) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jan 2009 20:21:21 +0000 X-IronPort-AV: E=Sophos;i="4.37,307,1231113600"; d="scan'208";a="124994685" Received: from sj-dkim-3.cisco.com ([171.71.179.195]) by sj-iport-2.cisco.com with ESMTP; 22 Jan 2009 20:21:00 +0000 Received: from sj-core-4.cisco.com (sj-core-4.cisco.com [171.68.223.138]) by sj-dkim-3.cisco.com (8.12.11/8.12.11) with ESMTP id n0MKL0SX005382 for ; Thu, 22 Jan 2009 12:21:00 -0800 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-4.cisco.com (8.13.8/8.13.8) with ESMTP id n0MKL0BC012734 for ; Thu, 22 Jan 2009 20:21:00 GMT Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 22 Jan 2009 12:21:00 -0800 Received: from [127.0.0.1] ([10.89.17.227]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 22 Jan 2009 12:20:59 -0800 Message-ID: <4978D52C.7040607@cisco.com> Date: Thu, 22 Jan 2009 14:21:00 -0600 From: scott comer Reply-To: etch-dev@incubator.apache.org User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: etch-dev@incubator.apache.org Subject: [vote]: (ETCH-27) mixins cause trouble when two or more mixed in files define a type with the same name. References: <592282763.1232489819792.JavaMail.jira@brutus> In-Reply-To: <592282763.1232489819792.JavaMail.jira@brutus> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Jan 2009 20:20:59.0800 (UTC) FILETIME=[F0925980:01C97CCE] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=1161; t=1232655660; x=1233519660; c=relaxed/simple; s=sjdkim3002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=sccomer@cisco.com; z=From:=20scott=20comer=20 |Subject:=20[vote]=3A=20(ETCH-27)=20mixins=20cause=20troubl e=20when=20two=20or=20more=20mixed=20in=0A=20files=20define= 20a=20type=20with=20the=20same=20name. |Sender:=20; bh=/I1n9R+07bQL5hUcLVgcxikSOEUtvy4X1KoGu2o/Fpc=; b=RT6TJKkJvps/pXVbvol3vC2k4uLGkYWQb4cyEHo2ocEdvgQtuWTO4uZjbn 3TbsIeGwHQgPJPPHA4T2GyXqDxd1RxJLkeD3D0peJ+Qh1nhQqL8coNbSIqu+ +B2zeQvzmY; Authentication-Results: sj-dkim-3; header.From=sccomer@cisco.com; dkim=pass ( sig from cisco.com/sjdkim3002 verified; ); X-Virus-Checked: Checked by ClamAV on apache.org [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.