Multiple declarations
Lars Hansen
lhansen at adobe.com
Fri May 2 13:49:17 PDT 2008
Should be a bug. The rule that's been considered is that redefinition
is allowed if the annotations are equal (either missing or the same
type).
--lars
> -----Original Message-----
> From: es4-discuss-bounces at mozilla.org
> [mailto:es4-discuss-bounces at mozilla.org] On Behalf Of Michael O'Brien
> Sent: 2. mai 2008 14:02
> To: Jeff Dyer
> Cc: es4-discuss Discuss
> Subject: Re: Multiple declarations
>
> Follow up:
>
> The RI allows typed redeclarations providing the type is not double.
> This works:
>
> // var x:double = 7
> // delete x
>
> var x:boolean = true
> delete x
>
> var x:string = "there"
> delete x
>
> var x:boolean = false
> delete x
>
> var x = false
> delete x
>
>
> But uncomment the first declaration and you get:
>
> defining ...
> **ERROR** FixtureError: incompatible redefinition of fixture
> name: x (near t.as:1:1-1.3)
>
>
> I presume this is an RI bug?
>
>
> Michael
>
>
>
> On May 1, 2008, at 4:12 PM, Jeff Dyer wrote:
> > Works for me in the RI:
> >
> >>> var x = 10; var x = 20; print(x)
> > 20
> >
> > As it should.
> >
> > Jd
> >
> > On 5/1/08 4:07 PM, Michael O'Brien wrote:
> >
> >> Is the following valid?
> >>
> >>
> >> var x = 2
> >> var x = 3
> >>
> >>
> >> The ES4 RI prevents this. ASC redefines x.
> >>
> >> What should this do?
> >>
> >> Michael
> >> _______________________________________________
> >> Es4-discuss mailing list
> >> Es4-discuss at mozilla.org
> >> https://mail.mozilla.org/listinfo/es4-discuss
> >
>
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>
More information about the Es4-discuss
mailing list