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

EpHasImpactVisitor>>visitProtocolRemoval: incorrectly marks event as having an impact #11941

Closed
akgrant43 opened this issue Nov 22, 2022 · 1 comment · Fixed by #11942
Closed

Comments

@akgrant43
Copy link
Collaborator

Bug description
EpHasImpactVisitor>>visitProtocolRemoval: incorrectly answer true for protocols that only have trait inherited methods. In this case removing the protocol doesn't have any impact since no methods are removed and the protocol will be kept anyway due to the trait method(s).

To Reproduce
RBSmalllintTestLocalMethodsSameThanTraitObject's private protocol contains only trait methods, so the protocol removal will have no affect (this can be tested by removing it in Calypso, the protocol will still exist and all methods will be present).

The following script should pass:

self assert: ((RBSmalllintTestLocalMethodsSameThanTraitObject methodsInProtocol: #private) allSatisfy: #isFromTrait).
event := EpProtocolRemoval
	behavior: RBSmalllintTestLocalMethodsSameThanTraitObject asRingDefinition 
	protocol: #private.
visitor := EpHasImpactVisitor inEnvironment: self class environment.
self assert: (event accept: visitor) not.

however the final assertion will fail.

Expected behavior
The above script passes.

Version information:

  • OS: Ubuntu
  • Version: 22.04
  • Pharo Version: 10 & 11

Expected development cost
PR on the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants