Fixes type changing when initially nil

This commit is contained in:
Deukhoofd 2018-11-14 17:10:06 +01:00
parent d6057ae954
commit 58b5a7355e
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{