From aa2539ad200f0d8316118a084f7dfabcc75c4124 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 22 Jan 2019 20:35:41 +0100 Subject: [PATCH] Handle object parameter for functions better --- Upsilon/StandardLibraries/StaticScope.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Upsilon/StandardLibraries/StaticScope.cs b/Upsilon/StandardLibraries/StaticScope.cs index 93f38bd..88de4cc 100644 --- a/Upsilon/StandardLibraries/StaticScope.cs +++ b/Upsilon/StandardLibraries/StaticScope.cs @@ -193,9 +193,12 @@ namespace Upsilon.StandardLibraries if (typeof(IEnumerable).IsAssignableFrom(type)) return Type.Table | Type.UserData; + if (type == typeof(object)) + return Type.Unknown; + if (type == typeof(ScriptType)) // allows every type - return (Type) 255; + return Type.Unknown; return new UndefinedUserDataTypeContainer(Type.UserData, type); } }