PR# 15195 Wrong line number or wrong source code shown for VTCG on expanded class
Problem Report Summary
Submitter: prestoat2000
Category: Compiler
Priority: Medium
Date: 2008/12/24
Class: Bug
Severity: Non-critical
Number: 15195
Release: 6.4.76313
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.13) Gecko/20080328 Firefox/2.0.0.1
Solaris 10 on SPARC
Synopsis: Wrong line number or wrong source code shown for VTCG on expanded class
Description
A root class test has an attribute x: TEST1 [TEST] Class TEST1 is declared as expanded class TEST1 [G -> ANY create default_create end] but the tokens are spaced out on separate lines with intervening blank lines. The declaration of `x' does not meet the creation constraint since TEST does not list `default_create' as a creation procedure. The compiler correctly detects the error and reports it. However, it says: ------------------------------------------------------------------------------- Error code: VTCG Error: actual generic parameter does not conform to constraint. What to do: make sure that actual parameter is a type conforming to the constraint (the type appearing after `->' for the corresponding formal). Class: TEST Feature: x In declaration: TEST1 [TEST] For type: TEST1 [TEST] Formal #1: TEST Unmet creation constraint features: default_create Line: 41 (source code is not available) ------------------------------------------------------------------------------- Note the "source code is not available". Line 41 is the line where formal generic G appears in class TEST1 but it seems that the compiler is trying to display line 41 of class TEST, which does not exist since TEST is only 13 lines long. Something is wrong here. Either the compiler should be displaying a different line number (one that corresponds to a construct in TEST) or it should be displaying line 41 from class TEST1. Unfortunately, I cannot write an eweasel test for this because eweasel does not currently support line number specification for validity errors.
To Reproduce
Compile with attached classes and config file.