Wrong unit conversion in the example #5

Closed
opened 2025-12-30 01:19:16 +01:00 by adam · 0 comments
Owner

Originally created by @floating-cat on GitHub (Feb 3, 2024).

Link: https://pkl-lang.org/main/current/language-tutorial/03_writing_a_template.html#typed-objects-properties-and-amending

It has a pkl configuration using bandwidthRequirementPerSecond = 50.mib.toUnit("mb"), but it output bandwidthRequirementPerSecond = 50.mb when evaluating.

It should be bandwidthRequirementPerSecond = 52.4288.mb.

Originally created by @floating-cat on GitHub (Feb 3, 2024). Link: https://pkl-lang.org/main/current/language-tutorial/03_writing_a_template.html#typed-objects-properties-and-amending It has a pkl configuration using ` bandwidthRequirementPerSecond = 50.mib.toUnit("mb")`, but it output ` bandwidthRequirementPerSecond = 50.mb` when evaluating. It should be `bandwidthRequirementPerSecond = 52.4288.mb`.
adam closed this issue 2025-12-30 01:19:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#5