Better error message if type is not indexable with type

This commit is contained in:
2018-11-19 14:29:35 +01:00
parent 86447d0a36
commit 2787d947b5
2 changed files with 6 additions and 2 deletions

View File

@@ -64,6 +64,11 @@ namespace Upsilon
{
LogError($"Cannot convert type '{actualType}' to '{expectedType}'", span);
}
public void LogInvalidIndexExpression(Type expressionType, Type indexType, TextSpan span)
{
LogError($"Cannot index type '{expressionType}' with type '{indexType}'", span);
}
}
public class DiagnosticsMessage