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,13 +27,10 @@ namespace Upsilon.StandardLibraries
|
||||||
{
|
{
|
||||||
if (_staticScope != null)
|
if (_staticScope != null)
|
||||||
return _staticScope;
|
return _staticScope;
|
||||||
lock (Scope)
|
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
||||||
{
|
_staticScope = evaluationScope;
|
||||||
var (evaluationScope, boundScope) = CreateStandardLibrary();
|
_staticBoundScope = boundScope;
|
||||||
_staticScope = evaluationScope;
|
return _staticScope;
|
||||||
_staticBoundScope = boundScope;
|
|
||||||
return _staticScope;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue