PR# 19975 Current used before initialized - creation invariant

Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: Low
Date: 2026/04/24
Class: Bug
Severity: Non-critical
Number: 19975
Release: 25.12.9.8922
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Current used before initialized - creation invariant

Description
The following program is not valid. The compiler should report a VEVI error because `Current` is used  before the attribute `b` of attached type is initialized in the creation procedure of class `AA`. Instead of that we get a call-on-void_target:

******************************** Thread exception *****************************
In thread           Root thread            0x0 (thread id)
*******************************************************************************
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
BB                  _invariant             is_valid:                    
<XXXXXXXXXXXXXXXX>                         Feature call on void target.  Fail
-------------------------------------------------------------------------------
BB                  _invariant             aa.b.is_valid:               
<XXXXXXXXXXXXXXXX>                         Class invariant violated.     Fail
-------------------------------------------------------------------------------
BB                  _invariant                                          
<XXXXXXXXXXXXXXXX>                         Routine failure.              Fail
-------------------------------------------------------------------------------
BB                  make @N
<XXXXXXXXXXXXXXXX>                         Routine failure.              Fail
-------------------------------------------------------------------------------
AA                  make @N
<XXXXXXXXXXXXXXXX>                         Routine failure.              Fail
-------------------------------------------------------------------------------
AA                  root's creation                                     
<XXXXXXXXXXXXXXXX>                         Routine failure.              Exit
-------------------------------------------------------------------------------
To Reproduce
class AA

create

	make

feature

	make
		do
			create b.make (Current)
		end

	b: BB

end
~~~~
class BB

create

	make

feature

	make (a: AA)
		do
			aa := a
		end

	aa: AA

	is_valid: BOOLEAN
		do
			Result := True
		end

invariant

	aa.b.is_valid

end
Problem Report Interactions