Skip to content

fix: replace <- with = for named argument in ecdf_intervals() call#454

Merged
jgabry merged 3 commits intostan-dev:masterfrom
utkarshpawade:fix-assignment-in-call-bug
Mar 11, 2026
Merged

fix: replace <- with = for named argument in ecdf_intervals() call#454
jgabry merged 3 commits intostan-dev:masterfrom
utkarshpawade:fix-assignment-in-call-bug

Conversation

@utkarshpawade
Copy link
Contributor

Fix #453

Fixes the use of <- (assignment operator) instead of = (named argument) when passing L to ecdf_intervals() in R/mcmc-traces.R.

Copilot AI review requested due to automatic review settings March 11, 2026 10:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an R argument-passing bug where L <- n_chain was used inside an ecdf_intervals() call, causing an unintended assignment rather than a named argument.

Changes:

  • Replace <- with = for the L argument in the ecdf_intervals() call in mcmc_rank_ecdf().
  • Add a NEWS entry describing the fix.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
R/mcmc-traces.R Corrects ecdf_intervals() invocation to use a proper named argument (L = n_chain).
NEWS.md Documents the fix in the development NEWS section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.55%. Comparing base (98a7245) to head (24c208c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #454   +/-   ##
=======================================
  Coverage   98.55%   98.55%           
=======================================
  Files          35       35           
  Lines        5864     5864           
=======================================
  Hits         5779     5779           
  Misses         85       85           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good but NEWS.md needs to be fixed (it mentions functions that don't exist). Also I think there is too much detail in NEWS.md for a small change like this. It can just say "Fix assignment-in-call bug in mcmc_rank_ecdf()", it doesn't need to describe it in so much detail

@jgabry
Copy link
Member

jgabry commented Mar 11, 2026

Thanks, merging now.

@jgabry jgabry merged commit 3ac1b5e into stan-dev:master Mar 11, 2026
5 of 6 checks passed
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.

Assignment-in-call Bug (<- instead of =)

4 participants