Skip to content

Loosen type of init in _norm to Number - #576

Merged
lkdvos merged 1 commit into
mainfrom
ksh/norm
Oct 12, 2026
Merged

lkdvos merged 1 commit into
mainfrom
ksh/norm

Conversation

@kshyatt

@kshyatt kshyatt commented Oct 12, 2026

Copy link
Copy Markdown
Member

This allows us to accommodate number types that are not themselves subtypes of Real

This allows us to accommodate number types that are not themselves subtypes of `Real`
@kshyatt
kshyatt requested a review from lkdvos October 12, 2026 12:02
@lkdvos

lkdvos commented Oct 12, 2026

Copy link
Copy Markdown
Member

Do you have an example here? I was always under the impression that init had to be of the type of the output, for type stability reasons, and norm must return something real

@kshyatt

kshyatt commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Do you have an example here?

Reactant's TracedRNumber{<:Real} is a subtype of Number, but not of Real.

@lkdvos
lkdvos merged commit 97cbcca into main Oct 12, 2026
47 of 48 checks passed
@lkdvos
lkdvos deleted the ksh/norm branch October 12, 2026 18:40
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.

2 participants