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

Validate argument amount in old(...) calls #1810

Merged
merged 1 commit into from Oct 24, 2023
Merged

Conversation

Vampire
Copy link
Member

@Vampire Vampire commented Oct 12, 2023

Previously if you had multiple arguments to an old(...) call 2nd and on were simply ignored,
and if you had no argument the compiler throws a NullPointerException.

Now the compiler validates that there is exactly one argument to an old(...) call.

Due to the multiple arguments now being forbidden, this is theoretically a breaking change,
but until recently the whole feature was not even documented and probably very few people
use it at all, let alone with multiple arguments.

Copy link
Member Author

Vampire commented Oct 12, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (4b325b3) 0.00% compared to head (3b646bd) 80.57%.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #1810       +/-   ##
=============================================
+ Coverage          0   80.57%   +80.57%     
- Complexity        0     4250     +4250     
=============================================
  Files             0      434      +434     
  Lines             0    13261    +13261     
  Branches          0     1686     +1686     
=============================================
+ Hits              0    10685    +10685     
- Misses            0     1961     +1961     
- Partials          0      615      +615     
Files Coverage Δ
...org/spockframework/compiler/DeepBlockRewriter.java 98.23% <100.00%> (ø)

... and 433 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonard84 leonard84 merged commit 1137415 into master Oct 24, 2023
41 of 57 checks passed
@leonard84 leonard84 deleted the validate-old-calls branch October 24, 2023 17:15
@leonard84
Copy link
Member

thanks @Vampire

@leonard84 leonard84 added this to the 2.4-M2 milestone Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants