Remove weird requirement that table indexing should always be a string or number
This commit is contained in:
parent
bb51fb3853
commit
224db6f237
|
@ -783,11 +783,6 @@ namespace Upsilon.Binder
|
|||
var expression = BindExpression(e.Expression);
|
||||
|
||||
var index = BindExpression(e.Index);
|
||||
if (index.Type != Type.Number && index.Type != Type.String && index.Type != Type.Unknown)
|
||||
{
|
||||
_diagnostics.LogInvalidIndexExpression(expression.Type, index.Type, e.Span);
|
||||
return new BoundBadExpression(e.Span);
|
||||
}
|
||||
switch (expression.Type.Type)
|
||||
{
|
||||
case Type.Table:
|
||||
|
|
Loading…
Reference in New Issue