From 58b5a7355ed69667b36c84ce33623e243aec11ef Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 14 Nov 2018 17:10:06 +0100 Subject: [PATCH] Fixes type changing when initially nil --- Upsilon/Binder/Binder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Upsilon/Binder/Binder.cs b/Upsilon/Binder/Binder.cs index 33e125f..3bc59d7 100644 --- a/Upsilon/Binder/Binder.cs +++ b/Upsilon/Binder/Binder.cs @@ -156,7 +156,7 @@ namespace Upsilon.Binder else { // don't allow assigning different typed variables to a variable, unless either of them is nil, allow assigning nil to all variables - if (boundExpression.Type != variable.Type && (variable.Type != Type.Nil || boundExpression.Type == Type.Nil)) + if (boundExpression.Type != variable.Type) { if (variable.Type == Type.Nil || boundExpression.Type == Type.Nil) {