4 ms·
Oh, just to add that let b: uint = uint(a) # can be written as: let b = uint(a) The type is inferred from the right hand side during assignment.
by arc776 5y ago
Oh, just to add that
let b: uint = uint(a)
# can be written as:
let b = uint(a)
The type is inferred from the right hand side during assignment. The only reason I wrote this
let b: uint = a
is because in my example `a` was an `int`, so
let b = a
Would infer an `int` type for `b`, which compiles fine, and doesn't show the type mismatch I wanted to present.