Sema: replace uses of `toUnsignedInt` with `toUnsignedIntAdvanced`

During semantic analysis the value may be an unresolved lazy value
which makes using `toUnsignedInt` invalid.

Add assertions to detect similar issues in the future.

Closes #18624
2e7d28dd0dVeikka Tuominen committed on 1/20/2024, 8:21:05 PM· committed by Andrew Kelleyparent10aff67
4 files changedLine totals unavailable