Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core):
Duration.toString()
throws an error (#18243)
`Duration.toString()` was intended to produce a value that would throw an exception when resolved, but unintentionally was written to always throw immediately (the reason it was throwing is that `Token.asString()` doesn't accept functions, it only accepts data values--`Lazy.string()` should have been used). Instead, we remove the validation completely. `toString()` now produces a meaningless string, and users should avoid using the `Duration` object in a context where it will be implicitly converted to a string. Fixes #18176. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information