Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread EWB 3 Build 13 - Build Isn't Checking Object Types
Sun, May 17 2020 6:47 PMPermanent Link

Rob Frye

Object types aren't being checked during build -

1) object assignments aren't checked for the correct type

2) object parameters in function/procedure calls aren't checked for the correct type

As well, objects not being initialized doesn't cause a warning.


For example the following code will compile with no errors or warnings in EWB3 -

   procedure TestProc1(const ctl: TLabel);
   begin
     ctl.Caption := 'TEST';
   end;

   procedure TestProc2;
   var
     lbl: TLabel;
     edt: TEdit;
   begin
     lbl := edt;
     TestProc1(edt);
   end;


But in EWB2, the code will cause 2 errors and 2 warnings -

   The variable edt has not been initialized
   Expected TLabel but instead found edt
   There is no function or procedure declaration that matches the TestProc1(edt) reference
   The variable edt has not been initialized


Rob
Mon, May 18 2020 8:53 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rob,

<< Object types aren't being checked during build -

1) object assignments aren't checked for the correct type

2) object parameters in function/procedure calls aren't checked for the correct type

As well, objects not being initialized doesn't cause a warning. >>

I think this has something to do with normal functions/procedures.  I'll let you know what I find out.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, May 18 2020 9:00 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rob,

Nah, it's just the code assistance interfering with the build again.  A fix will be in build 14.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, May 18 2020 9:15 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rob,

Nope, scratch that - it's definitely a straight-up bug in the type resolution and has nothing to do with the code assistance.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, May 18 2020 9:30 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rob,

This is now fixed for build 14.

Tim Young
Elevate Software
www.elevatesoft.com
Image