Skip to content

Allow (is) & (every_is) simultaneously#531

Merged
dmdashenkov merged 7 commits intomasterfrom
allow-is-&-every-is
Apr 27, 2020
Merged

Allow (is) & (every_is) simultaneously#531
dmdashenkov merged 7 commits intomasterfrom
allow-is-&-every-is

Conversation

@dmdashenkov
Copy link
Contributor

Consider options (is) and (every_is) applied to a type at the same time:

option (every_is).java_type = "Fruit";

message Tomato {
    option (is).java_type = "Vegetable";

    // ...
}

Currently, Java class Tomato only implements Vegetable interface.

With this PR we make (is) and (every_is) complementary. This way, Java class Tomato implements both Vegetable and Fruit interfaces.

@dmdashenkov dmdashenkov self-assigned this Apr 27, 2020
@dmdashenkov dmdashenkov linked an issue Apr 27, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 27, 2020

Codecov Report

Merging #531 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #531      +/-   ##
============================================
- Coverage     73.70%   73.70%   -0.01%     
+ Complexity     2931     2930       -1     
============================================
  Files           503      503              
  Lines         11872    11871       -1     
  Branches        668      667       -1     
============================================
- Hits           8750     8749       -1     
  Misses         2902     2902              
  Partials        220      220              

@dmdashenkov dmdashenkov requested a review from armiol April 27, 2020 18:33
@dmdashenkov
Copy link
Contributor Author

@armiol, PTAL.

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmdashenkov do we test this behavior?

@dmdashenkov dmdashenkov merged commit feade0a into master Apr 27, 2020
@dmdashenkov dmdashenkov deleted the allow-is-&-every-is branch April 27, 2020 19:09
@dmitrykuzmin dmitrykuzmin mentioned this pull request Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(every_is) should not be overridden by (is)

2 participants