Log error if using full stop indexer on userdata type when the indexer doesn't exist

This commit is contained in:
Deukhoofd 2018-11-29 19:10:03 +01:00
parent f983239b5a
commit 4fa0ad9f70
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 2 additions and 0 deletions

View File

@ -712,6 +712,8 @@ namespace Upsilon.Binder
{ {
return new BoundFullStopIndexExpression(expression, index, property.Type, e.Span); return new BoundFullStopIndexExpression(expression, index, property.Type, e.Span);
} }
_diagnostics.LogError($"No variable '{index}' found on type '{udBoundDef.Name}'.",
e.Span);
} }
return new BoundFullStopIndexExpression(expression, index, Type.Unknown, e.Span); return new BoundFullStopIndexExpression(expression, index, Type.Unknown, e.Span);
case Type.Unknown: case Type.Unknown: