Handle interop better
This commit is contained in:
parent
364e71198e
commit
ac12fbb60d
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Upsilon.BaseTypes.ScriptTypeInterfaces;
|
using Upsilon.BaseTypes.ScriptTypeInterfaces;
|
||||||
|
using Upsilon.BaseTypes.UserData;
|
||||||
using Upsilon.Binder;
|
using Upsilon.Binder;
|
||||||
using Upsilon.Binder.VariableSymbols;
|
using Upsilon.Binder.VariableSymbols;
|
||||||
using Upsilon.Evaluator;
|
using Upsilon.Evaluator;
|
||||||
|
@ -52,7 +53,13 @@ namespace Upsilon.BaseTypes.ScriptFunction
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var parameterType = v.GetType();
|
|
||||||
|
System.Type parameterType;
|
||||||
|
if (v is GenericUserData ud)
|
||||||
|
parameterType = ud.GetCSharpType();
|
||||||
|
else
|
||||||
|
parameterType = v.GetType();
|
||||||
|
|
||||||
if (parameterSymbol.BoundTypeDefinition != null)
|
if (parameterSymbol.BoundTypeDefinition != null)
|
||||||
{
|
{
|
||||||
var validSymbol =
|
var validSymbol =
|
||||||
|
|
|
@ -27,15 +27,12 @@ namespace Upsilon.StandardLibraries
|
||||||
{
|
{
|
||||||
if (_staticScope != null)
|
if (_staticScope != null)
|
||||||
return _staticScope;
|
return _staticScope;
|
||||||
lock (Scope)
|
|
||||||
{
|
|
||||||
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
||||||
_staticScope = evaluationScope;
|
_staticScope = evaluationScope;
|
||||||
_staticBoundScope = boundScope;
|
_staticBoundScope = boundScope;
|
||||||
return _staticScope;
|
return _staticScope;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static BoundScope BoundScope
|
public static BoundScope BoundScope
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue