[infinispan-issues] [JBoss JIRA] (IPROTO-13) Proto parser does not detect duplicate enum constant names

Adrian Nistor (JIRA) issues at jboss.org
Mon Jul 11 07:52:00 EDT 2016


    [ https://issues.jboss.org/browse/IPROTO-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263645#comment-13263645 ] 

Adrian Nistor edited comment on IPROTO-13 at 7/11/16 7:51 AM:
--------------------------------------------------------------

Also, enum values use C++ scoping rules, so the both enum names and enum constant names must be unique across the entire scope in which are defined not just within the enum that defines them.


was (Author: anistor):
Also, enum values use C++ scoping rules, so the names must be unique across the entire package in which are defined not just within the enum that defines them.

> Proto parser does not detect duplicate enum constant names
> ----------------------------------------------------------
>
>                 Key: IPROTO-13
>                 URL: https://issues.jboss.org/browse/IPROTO-13
>             Project: Infinispan ProtoStream
>          Issue Type: Bug
>    Affects Versions: 3.0.5.Final
>            Reporter: Adrian Nistor
>            Assignee: Adrian Nistor
>             Fix For: 3.0.6.Final
>
>
> This should generate an error:
> {code}
> enum E {
>    A = 1;
>    A = 2;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list