Icon View Incident Report

Serious Serious
Reported By: Michael Dreher
Reported On: 11/8/2017
For: Version 2.06 Build 11
# 4624 Compiler Not Allowing Scoped Instance Member Access from within Class Methods

I just updated to 2.06B11 and noticed, access of class instance members from a class method is not possible anymore.

However, this now is also true when accessing instance members of a concrete instance.

type
 TMyClass = class public
   // ...
   class procedure cBar;
 end;

class procedure TMyClass.cBar;
var c : TMyClass;
   iValue : integer;
begin
 c := TMyClass.Create;
 c.Foo; // [Error] Cannot access the Foo() instance member from within a class method
 iValue := c.GetI; // [Error] Cannot access the GetI instance member from within a class method
 iValue := c.i; // [Error] Cannot access the i instance member from within a class method
end;



Comments Comments
The compiler was being much too coarse-grained with respect to checking accesses to class members and was only looking at the outer class method instead of looking at the specific scope references used with the member access.


Resolution Resolution
Fixed Problem on 11/10/2017 in version 2.06 build 12


Products Affected Products Affected
Elevate Web Builder
Elevate Web Builder Trial

Image