how to solve compile error : 2 type parameter expected for inline function

24 views Asked by At

enter image description here

As above code, I want to pass only one generic type parameter like number.on<Int> { }. But, compiler complains the error like attached picture. I think, In above code, complier may know type T because number is Number as receiver of onfunction. but it's doesn't.

Is there any solutions?

0

There are 0 answers