You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org> on 2013/06/24 10:44:20 UTC

[jira] [Updated] (AVRO-523) records with the same name as a member generate bad c++ code

     [ https://issues.apache.org/jira/browse/AVRO-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-523:
-------------------------------------

    Description: 
records with the same name as a member generate bad c++ code:
{code}

{
    "type" : "array",
    "name" : "optionals",
    "items" : [
       { "name" : "l", "type" : "record", "fields" : [ { "name" : "l", "type": "long"} ] },
       { "name" : "r", "type" : "record", "fields" : [ { "name" : "r", "type": "long"} ] }
    ]
}
{code}

produces c++ code such that when it is compiled it produces:

union2.h:42: error: field 'int64_t avrouser::l::l' with same name as class


  was:
records with the same name as a member generate bad c++ code:

{
    "type" : "array",
    "name" : "optionals",
    "items" : [
       { "name" : "l", "type" : "record", "fields" : [ { "name" : "l", "type": "long"} ] },
       { "name" : "r", "type" : "record", "fields" : [ { "name" : "r", "type": "long"} ] }
    ]
}

produces c++ code such that when it is compiled it produces:

union2.h:42: error: field 'int64_t avrouser::l::l' with same name as class


    
> records with the same name as a member generate bad c++ code
> ------------------------------------------------------------
>
>                 Key: AVRO-523
>                 URL: https://issues.apache.org/jira/browse/AVRO-523
>             Project: Avro
>          Issue Type: Bug
>          Components: c++
>            Reporter: John Plevyak
>
> records with the same name as a member generate bad c++ code:
> {code}
> {
>     "type" : "array",
>     "name" : "optionals",
>     "items" : [
>        { "name" : "l", "type" : "record", "fields" : [ { "name" : "l", "type": "long"} ] },
>        { "name" : "r", "type" : "record", "fields" : [ { "name" : "r", "type": "long"} ] }
>     ]
> }
> {code}
> produces c++ code such that when it is compiled it produces:
> union2.h:42: error: field 'int64_t avrouser::l::l' with same name as class

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira