[
https://issues.apache.org/jira/browse/THRIFT-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791093#action_12791093
]
Dave Engberg commented on THRIFT-632:
-------------------------------------
This patch seems to break some uses of numeric constants. Specifically, an i16
constant can't be used as an i16 parameter default:
/tmp $ cat TestConst.thrift
const i16 CONST1 = 1
const i32 CONST2 = 2
service TestConst {
void foo(1: i16 p1 = CONST1, 2: i32 p2 = CONST2)
}
/tmp $ thrift -gen java TestConst.thrift
[FAILURE:/tmp/TestConst.thrift:4] type error: const "p1" was declared as i16
This works in a non-patched 0.2.0 release.
> Constants of enum types don't behave well
> -----------------------------------------
>
> Key: THRIFT-632
> URL: https://issues.apache.org/jira/browse/THRIFT-632
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Java)
> Affects Versions: 0.2
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.3
>
> Attachments: thrift-632-v2.patch, thrift-632-v3.patch,
> thrift-632-v4.patch, thrift-632-v5.patch, thrift-632-v6.patch,
> thrift-632-v7.patch, thrift-632.patch
>
>
> It turns out that THRIFT-551 missed the case of constants defined of enum
> types.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.