thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <br...@rapleaf.com>
Subject Re: const bug
Date Mon, 23 Aug 2010 20:53:34 GMT
Agree, I'd love to see a ticket for this - and I'd love if it had a patch
attached even more.

On Mon, Aug 23, 2010 at 1:45 PM, Mark Slee <mslee@facebook.com> wrote:

> I think this one falls under the category of "reasonable, but currently
> unimplemented feature." Not sure if there's a JIRA ticket open for this
> (nothing springs to mind). Worth opening one, I don't see any reason not to
> support this.
>
> -----Original Message-----
> From: Stephen Haberman [mailto:stephen@exigencecorp.com]
> Sent: Monday, August 23, 2010 1:36 PM
> To: thrift-user@incubator.apache.org
> Subject: const bug
>
> Hi,
>
> We're running an old pre-0.3 thrift and trying upgrade, but running into
> a compile error. I've reduce it down to this example:
>
>    struct A {
>      1: string name = ""
>    }
>    const A DEFAULT_A = {}
>    struct B {
>      1: A a = DEFAULT_A
>    }
>
> The problem is that with "a = DEFAULT_A", we get this exception:
>
>    type error: const "a" was declared as struct/xception
>
> If I remove "= DEFAULT_A", then it works great.
>
> Just looking at the thrift file, using the DEFAULT_A const as a default
> value seems to make sense. Is this a bug, or is it really illegal to use
> const structs as default values?
>
> Thanks,
> Stephen
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message