PR# 18057 Using $x on a attached `x' entity which has not yet been initialized does not yield any error
Problem Report Summary
Submitter: manus_eiffel
Category: Compiler
Priority: Medium
Date: 2011/12/16
Class: Bug
Severity: Serious
Number: 18057
Release: 7.0
Confidential: No
Status: Analyzed
Responsible:
Environment: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2
Synopsis: Using $x on a attached `x' entity which has not yet been initialized does not yield any error
Description
Using $x on a attached `x' entity which has not yet been initialized does not yield any error, I was expecting a VEVI error.
To Reproduce
g local x: STRING do f ($x) end f (s: POINTER) do end
Problem Report Interactions
Your point does make sense indeed and it will cover what I was trying to avoid, passing the address on something not fully initialized.
Should it be the other way round: if $ operator is applied to a variable, it should be of a detachable type, since we do not control what is stored there? Or, even worse, what happens if the external code puts a value of a wrong type to this variable?