Skip to content

(every_is) should not be overridden by (is) #529

@armiol

Description

@armiol

Consider the use case:

// ...
option (every_is).java_type = "com.acme.effort.GoodDeedMixin";

// ...

message RosesPaintedRed {

    option (is).java_type = "com.acme.author.LewisCarrollMixin"

    // ...
}

What I expected was that RosesPainted received two interfaces, as it was indeed a good deed, and it was still related to Alice in Wonderland by Mr. Carroll. It looks obvious as "every" means "each one".

However, at the moment, the message-level (is) option overrides the file-level one. Hence, the generated class gets only LewisCarrollMixin.

Also, (is) does not seem to support several comma-delimited types. So the only way for me to achieve the goal is to create another interface deriving from both LewisCarrollMixin and GoodDeedMixin, and put it into (is) option. This is quite a linguistic task for me.

So, as this issue gets resolved, (is) on the message level should append the (every_is), not override it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions