From 2a0cce9bac2006ba713bad69962461fe1bf2176c Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 30 Nov 2018 16:48:38 +0100 Subject: [PATCH] Fixed function parameter type not setting properly when unbound --- Upsilon/Binder/VariableSymbols/FunctionParameterSymbol.cs | 2 +- Upsilon/Binder/VariableSymbols/VariableSymbol.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Upsilon/Binder/VariableSymbols/FunctionParameterSymbol.cs b/Upsilon/Binder/VariableSymbols/FunctionParameterSymbol.cs index 9ede0df..0af5d9f 100644 --- a/Upsilon/Binder/VariableSymbols/FunctionParameterSymbol.cs +++ b/Upsilon/Binder/VariableSymbols/FunctionParameterSymbol.cs @@ -9,7 +9,7 @@ namespace Upsilon.Binder.VariableSymbols public FunctionParameterSymbol(string name, Type type) : base(name, type, true) { - + _type = type; } public FunctionParameterSymbol(string name, BoundTypeDefinition type) : base(name, type.ScriptType, true) diff --git a/Upsilon/Binder/VariableSymbols/VariableSymbol.cs b/Upsilon/Binder/VariableSymbols/VariableSymbol.cs index d046e5e..6cb86b0 100644 --- a/Upsilon/Binder/VariableSymbols/VariableSymbol.cs +++ b/Upsilon/Binder/VariableSymbols/VariableSymbol.cs @@ -11,7 +11,7 @@ namespace Upsilon.Binder.VariableSymbols Name = name; } - public virtual Type Type { get; set; } + public virtual Type Type { get; set; } = Type.Unknown; public bool Local { get; } public string Name { get; } public string[] CommentValue { get; set; }