-
Notifications
You must be signed in to change notification settings - Fork 139
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 declaration of events in interfaces #2662
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:feature/stable-cadence commit c9938e6 Collapsed results for better readability
|
Codecov Report
@@ Coverage Diff @@
## feature/stable-cadence #2662 +/- ##
==========================================================
+ Coverage 78.90% 79.41% +0.50%
==========================================================
Files 342 336 -6
Lines 81650 80178 -1472
==========================================================
- Hits 64430 63675 -755
+ Misses 14871 14207 -664
+ Partials 2349 2296 -53
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…to sainati/interface-events
…to sainati/interface-events
@dsainati1 Is this PR marked as a draft because the FLIP isn't approved yet, or is there still something missing code-wise? |
Yes, if the design is approved as-is, this implementation is complete, so it's ready to be reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Good idea to first change the behaviour of event declarations, then remove type requirements in a separate PR 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do events get inherited for interfaces (or do we want them to be inherited)?
Could you also add some tests to verify?
No. There's a test for that in the PR already I think as well. |
…to sainati/interface-events
Closes #2602
Allows contract interfaces to declare events as their own types, rather than implicitly using such declarations to create type requirements. Currently, these declarations are only in scope within the body of the interface, and thus can only be emitted in default implementations or in pre/post conditions in these interfaces, but subject to the discussion in onflow/flips#118 this may change.
master
branchFiles changed
in the Github PR explorer