PR# 19990 Once classes: calling once creation procedure as regular call

Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: Low
Date: 2026/06/04
Class: Bug
Severity: Non-critical
Number: 19990
Release: 25.12.9.8922
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Once classes: calling once creation procedure as regular call

Description
A once class has two once creation procedures `f` and `g`. Let's create the first instance of the once class using the creation procedure `f`, and then call `g` (as a regular call) on that first instance before actually creating the second instance of the once class. We end up with `{BB}.f` and `{BB}.g` pointing to the same object. This is wrong. The creation of the second instance should create a new object, even though the call to the creation procedure `g` on this newly created object will have no effect since the once procedure `g` has already been called.

--
Eric Bezault
To Reproduce
class AA

create

	make

feature

	make
		local
			b: BB
		do
			create b.f
			b.g
			print ("{BB}.f = {BB}.g: ")
			print ({BB}.f = {BB}.g)
			print ("%N")
		end
		
end
~~~~
once class BB

create

	f, g

feature

	f
		once
		end

	g
		once
		end

end
Problem Report Interactions