Remove weird requirement that table indexing should always be a string or number

This commit is contained in:
Deukhoofd 2019-01-21 16:13:18 +01:00
parent bb51fb3853
commit 224db6f237
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 0 additions and 5 deletions

View File

@ -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: