Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow enums in interfaces #4731

Merged
merged 3 commits into from
Aug 7, 2018
Merged

Allow enums in interfaces #4731

merged 3 commits into from
Aug 7, 2018

Conversation

axic
Copy link
Member

@axic axic commented Aug 7, 2018

Fixes #4087

@chriseth
Copy link
Contributor

chriseth commented Aug 7, 2018

I think we would be able to work much faster if everyone had access to @axic's local repository ;)

}
}
)";
compileAndRun(sourceCode, 0, "C");
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure library linking is implemented in the test suite?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, it is automatic

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I think it is not.

{
char const* sourceCode = R"(
interface I {
enum Direction { Left, Right }
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps it would be better to use enum Direction { A, B, Left, Right} so that the return values show whether the interface or the library enum was used.

Copy link
Contributor

@chriseth chriseth left a comment

Choose a reason for hiding this comment

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

Change semantics test.

@codecov
Copy link

codecov bot commented Aug 7, 2018

Codecov Report

Merging #4731 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4731      +/-   ##
===========================================
+ Coverage    87.53%   87.54%   +<.01%     
===========================================
  Files          313      313              
  Lines        30792    30798       +6     
  Branches      3660     3658       -2     
===========================================
+ Hits         26954    26961       +7     
  Misses        2585     2585              
+ Partials      1253     1252       -1
Flag Coverage Δ
#all 87.54% <100%> (ø) ⬆️
#syntax 28.31% <9.09%> (-0.02%) ⬇️

@chriseth
Copy link
Contributor

chriseth commented Aug 7, 2018

@axic good to merge?

@chriseth chriseth merged commit d775632 into develop Aug 7, 2018
@axic axic deleted the interface-enum branch August 7, 2018 19:09
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.

2 participants