Fix lack of fallback to float for large integer literals#7389
Fix lack of fallback to float for large integer literals#7389laurmaedje merged 5 commits intotypst:mainfrom
Conversation
ba76a27 to
7f5d4fe
Compare
Fixes typst#7388 Relates-to: typst#5969
7f5d4fe to
bf8437f
Compare
|
I'm wondering whether we actually want to keep this behavior. Perhaps, we should rather turn this into a hard error and require the dot to explicitly turn it into a float. |
|
Actually, I also find the behaviour weird. There should be a warning at least, like the warning for
|
|
Apologies for the regression! I should've checked the behavior in However, I do agree with Laurenz that this is weird. I would consider it an odd piece of trivia if Another option discussed in #5462 is to just warn on this case, but I don't think changing the type to a float ever really makes sense, so I would prefer an error and require an explicit dot. Separately, we should just add methods |
|
Given the precedent of |
|
Let's turn it into a hard error. |
|
Actually, let's first merge the fix and then introduce the hard error in a separate PR. That way I could cherry-pick should we decide to cut a point release. |
|
Thanks! Feel free to open a second PR for introducing a hard error. :) |
Fixes #7388
Relates-to: #5969