We’re getting errors like:
+loop_main.kt:158:54: error: type mismatch: inferred type is () -> Unit but KFunction<TypeVariable(U)> was expected
+ moduleRegistry.exportFunc(name, "Z_printZ_vv", spectest_print);
+ ^
+loop_main.kt:159:58: error: type mismatch: inferred type is (Int) -> Unit but KFunction<TypeVariable(U)> was expected
+ moduleRegistry.exportFunc(name, "Z_print_i32Z_vi", spectest_print_i32);
+ ^
+loop_main.kt:160:58: error: type mismatch: inferred type is (Float) -> Unit but KFunction<TypeVariable(U)> was expected
+ moduleRegistry.exportFunc(name, "Z_print_f32Z_vf", spectest_print_f32);
+ ^
+loop_main.kt:161:63: error: type mismatch: inferred type is (Int, Float) -> Unit but KFunction<TypeVariable(U)> was expected
+ moduleRegistry.exportFunc(name, "Z_print_i32_f32Z_vif", spectest_print_i32_f32);
+ ^
+loop_main.kt:162:58: error: type mismatch: inferred type is (Double) -> Unit but KFunction<TypeVariable(U)> was expected
+ moduleRegistry.exportFunc(name, "Z_print_f64Z_vd", spectest_print_f64);
+ ^
+loop_main.kt:163:63: error: type mismatch: inferred type is (Double, Double) -> Unit but KFunction<TypeVariable(U)> was expected
+ moduleRegistry.exportFunc(name, "Z_print_f64_f64Z_vdd", spectest_print_f64_f64);
where the functions are of the form:
var spectest_print = fun() {
print("spectest.print()\n");
}
and we don’t know how to make sense of any of this.