lang: ast: Add scope feedback for classes

We did this elsewhere for functions, let's add classes too.
This commit is contained in:
James Shubin
2025-06-05 23:05:14 -04:00
parent dcd4f0709f
commit 4189a1299a
2 changed files with 18 additions and 0 deletions

View File

@@ -6828,6 +6828,9 @@ func (obj *StmtInclude) SetScope(scope *interfaces.Scope) error {
stmt, exists := scope.Classes[obj.Name]
if !exists {
if obj.data.Debug || true { // TODO: leave this on permanently?
classScopeFeedback(scope, obj.data.Logf)
}
err := fmt.Errorf("class `%s` does not exist in this scope", obj.Name)
return highlightHelper(obj, obj.data.Logf, err)
}