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

Fix Colon(::TracedRNumber, ::TracedRNumber) #839

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mofeing
Copy link
Collaborator

@mofeing mofeing commented Mar 3, 2025

fixes #837

cc @jumerckx

@Pangoraw
Copy link
Collaborator

Pangoraw commented Mar 3, 2025

Note that the test passes without the fix because @trace for does just look for the syntactic variables (start and stop in this case) and does not call :.

@mofeing
Copy link
Collaborator Author

mofeing commented Mar 3, 2025

exactly, this fixes the construction of start:end when both vars are TracedRNumbers, which tests weren't checking

@mofeing mofeing marked this pull request as draft March 3, 2025 14:11
@mofeing
Copy link
Collaborator Author

mofeing commented Mar 3, 2025

okay, so the solution i propose here doesn't really work because UnitRange{T} requires T<:Real, so UnitRange{TracedRNumber{Int}} is not valid because !(TracedRNumber{Int}<:Real) (too bad Julia is not covariant)

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.

Range operator fails with TracedRNumbers
2 participants