Fixes type changing when initially nil
This commit is contained in:
parent
d6057ae954
commit
58b5a7355e
|
@ -156,7 +156,7 @@ namespace Upsilon.Binder
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// don't allow assigning different typed variables to a variable, unless either of them is nil, allow assigning nil to all variables
|
// 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)
|
if (variable.Type == Type.Nil || boundExpression.Type == Type.Nil)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue