3 ms·
one way is to do return SOME_EXRPRESSION; and then look at the compiler error. Another way is let () = SOME_EXPRESSION; which works as long as SOME_
by steveklabnik 9y ago
one way is to do
return SOME_EXRPRESSION;
and then look at the compiler error. Another way is
let () = SOME_EXPRESSION;
which works as long as SOME_EXPRESSION is not of type (), but if it compiles, well, you know the type :)
Another way is to use some sort of IDE integration that gives you "show me the type on hover".