From 4fa0ad9f70f5f413cecd3a032d9310ea8004dd30 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 29 Nov 2018 19:10:03 +0100 Subject: [PATCH] Log error if using full stop indexer on userdata type when the indexer doesn't exist --- Upsilon/Binder/Binder.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Upsilon/Binder/Binder.cs b/Upsilon/Binder/Binder.cs index 02c3329..66cc4fb 100644 --- a/Upsilon/Binder/Binder.cs +++ b/Upsilon/Binder/Binder.cs @@ -712,6 +712,8 @@ namespace Upsilon.Binder { 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); case Type.Unknown: