educative.io

Why do we need to type cast Celsius to Fahrenheit even when they are aliased to same float type

type Celsius float32
type Fahrenheit float32

why do we need to typecast one to other?

The return type for the function is Fahrenheit. If you change that, I think there will be no requirement for typecasting.