PR# 19825 Misleading error message for `@foo`
Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: Low
Date: 2021/12/29
Class: Bug
Severity: Non-critical
Number: 19825
Release: 21.11
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Misleading error message for `@foo`
Description
When compiling this code:
~~~~~~~~~~~~~~~~~~
f
local
foo: INTEGER
do
⟳ bar: <<1, 2>> ¦ @foo.do_nothing ⟲
end
~~~~~~~~~~~~~~~~~~
we get this error message:
~~~~~~~~~~~~~~~~~~
Unknown identifier `foo'.
Error code: VEEN
Error: unknown identifier.
What to do: make sure that identifier, if needed, is final name of
feature of class, or local entity or formal argument of routine.
Class: AA
Feature: f
Identifier: foo
Line: 50
do
-> ⟳ bar: <<1, 2>> ¦ @foo.do_nothing ⟲
end
~~~~~~~~~~~~~~~~~~
This is misleading because `foo` is the name of a local variable. Instead of a VEEN error, I think that we should add a third clause to VOIT (or introduce a new validity code) indicating that `foo` is not the name of an iteration item or it is used outside of its scope.
--
Eric Bezault
To Reproduce
Problem Report Interactions