We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20747ca commit 5cb3e74Copy full SHA for 5cb3e74
1 file changed
src/OneScript.Native/Compiler/MethodCompiler.cs
@@ -1286,10 +1286,15 @@ private Expression CreateMethodCall(CallNode node)
1286
var methodInfo = symbol.Method;
1287
if (methodInfo is ContextMethodInfo contextMethod)
1288
{
1289
- return DirectClrCall(
+ var call = DirectClrCall(
1290
GetMethodBinding(binding, symbol),
1291
contextMethod.GetWrappedMethod(),
1292
args);
1293
+
1294
+ if (call.Type == typeof(IValue))
1295
+ return Expression.TypeAs(call, typeof(BslValue));
1296
1297
+ return call;
1298
}
1299
1300
if (methodInfo is BslNativeMethodInfo nativeMethod)
0 commit comments