PR# 15139 VOMB(1) error in inspect "when" clause causes bogus VEVI error
Problem Report Summary
Submitter: prestoat2000
Category: Compiler
Priority: Medium
Date: 2008/12/10
Class: Bug
Severity: Non-critical
Number: 15139
Release: 6.3.76070
Confidential: No
Status: Closed
Responsible: alexk_es
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.9) Gecko/20071111 Firefox/2.0.0.9
Solaris 10 on SPARC
Synopsis: VOMB(1) error in inspect "when" clause causes bogus VEVI error
Description
A routine has a VOMB(1) error because the type of the expression in
a "when" clause does not match the inspect expression type. When compiled
in void-safe mode, the compiler correctly detects the VOMB(1) but also
reports what appears to be a spurious VEVI error.
A similar routine with body
if 1 then
Result := "weasel"
else
Result := "stoat"
end
does not elicit a VEVI error from the compiler.
To Reproduce
Compile with attached class and config file. Compiler reports (report of VEVI
error seems to be spurious):
Error code: VOMB(1)
Error: incorrect type for inspect expression.
What to do: make sure that type is INTEGER, CHARACTER, NATURAL or a .NET enum.
Class: TEST
Feature: z
Type: STRING_8
Line: 19
do
-> inspect "Stoat" when 1 then
Result := "stoat"
-------------------------------------------------------------------------------
Error code: VEVI
Error: variable is not properly set.
What to do: ensure the variable is properly set by the corresponding
setter instruction.
Class: TEST
Feature: z
Variable: Result
Line: 24
end
-> end
Problem Report Interactions