Don't try and type check function parameters if they're not bound
This commit is contained in:
parent
d641ab936f
commit
493a8ebb9d
|
@ -250,11 +250,11 @@ namespace Upsilon.BoundTypes
|
||||||
|
|
||||||
if (functionParameter.Type.Type.HasFlag(Type.UserData))
|
if (functionParameter.Type.Type.HasFlag(Type.UserData))
|
||||||
{
|
{
|
||||||
var variable = Binder.Binder.ResolveVariable(callingParameter, null);
|
var variable = Binder.Binder.ResolveVariable(callingParameter, null) as UserDataVariableSymbol;
|
||||||
|
var parent =
|
||||||
|
(UserDataBoundTypeDefinition) variable?.BoundTypeDefinition;
|
||||||
if (variable != null && variable.TypeContainer == Type.UserData)
|
if (variable != null && variable.TypeContainer == Type.UserData)
|
||||||
{
|
{
|
||||||
var parent =
|
|
||||||
(UserDataBoundTypeDefinition) ((UserDataVariableSymbol) variable).BoundTypeDefinition;
|
|
||||||
if (parent.ValidInternalTypes.Length != 0)
|
if (parent.ValidInternalTypes.Length != 0)
|
||||||
{
|
{
|
||||||
if (functionParameter.ActualType != null)
|
if (functionParameter.ActualType != null)
|
||||||
|
|
Loading…
Reference in New Issue