The operator isn't defined for this combination of types. Auk has no implicit numeric
conversions, so float * int is an error: convert one side with float(n) or int(x).
Wrong#
fn scale(x: float, n: int): float = x * nFixed#
fn scale(x: float, n: int): float = x * float(n)Common causes#
- Mixing
intandfloat, including literals: write2.0, not2, with floats. +between astrand a number: interpolate instead,"n = {n}".<on a type that isn'tOrd.