Jump to content
Marco Cantu

Patch 2 for RAD Studio 10.4 now available

Recommended Posts

10.4 Update 2 breaks code that compiled fine with update 1 and earlier

This is the library that shows the problem

https://github.com/VSoftTechnologies/VSoft.Messaging

 

  TChannelHelper = record
  public
    procedure PostMessage<T : record>(const message : T);
  end

This is my message record type

TGoodByeMessage = record
    MsgID  : TMessageID;
    Filler : TMessageFiller;
    Name   : string;
  public
    constructor Create(const theName : string);
  end;

It failed here with

 

[dcc32 Error] MsgDemoMainForm.pas(62): E2010 Incompatible types: 'T' and 'TGoodByeMessage'

 

procedure TForm2.goodbyeButtonClick(Sender: TObject);
var
  msg : TGoodByeMessage;
begin
  msg := TGoodByeMessage.Create('world');
  FChannel.Queue.PostMessage(msg); //<============
end;

 

This looks like records are broken with this updates, why? I'm guessing this has something to do with managed records?

 

Share this post


Link to post
3 minutes ago, Vincent Parrett said:

This looks like records are broken with this updates

How could they know you where going to do that 🙂

 

Sorry, couldn't help myself..

 

Share this post


Link to post

Also bugs reported as fixed are not fixed:

RSP-29271    [DelphiLSP] Code Insight adds unneeded () when changing procedures/functions

Share this post


Link to post
40 minutes ago, Vincent Parrett said:

More on my issue, removing the record constraint does allow it compile, but removes some compile time type safety :classic_wacko: 

Will it compile if you restore the constraint but specify the generic type explicitly instead of relying of type inference? 

Share this post


Link to post
13 minutes ago, David Heffernan said:

Will it compile if you restore the constraint but specify the generic type explicitly instead of relying of type inference? 

No, that was the first thing I tried, get this error instead

 

 [dcc32 Error] MsgDemoMainForm.pas(62): E2512 Type parameter 'T' must be a non-nullable value type

 

Which makes me suspect that record constraints are broken. My records have constructors, I'm guessing that now makes them managed records (I really haven't paid too much attention to how managed records work).

Share this post


Link to post
19 minutes ago, Vincent Parrett said:

My records have constructors, I'm guessing that now makes them managed records

No I don't think it does make them managed records. 

 

I don't really understand how such simple code could break the compiler. It's as if Embarcadero don't have comprehensive tests in place. 

  • Like 3
  • Confused 1

Share this post


Link to post
4 minutes ago, David Heffernan said:

I don't really understand how such simple code could break the compiler. It's as if Embarcadero don't have comprehensive tests in place. 

My thoughts exactly. 

Share this post


Link to post

@Arnaud Bouchez That video almost made me soil my pants, if that is the case, ( not sure can't stand yet :classic_biggrin: ) then you owe me the cleaning service cost.

  • Confused 1

Share this post


Link to post

I'm sure that 'nobody got a raise for decade' is wrong. Nobody in IT got a raise, but surely management did. They handled the fallout caused by the mistakes of those stupid IT people after all!

Edited by dummzeuch
  • Haha 3

Share this post


Link to post

Honestly... I don't care if compiler broke your code... they released fix for compiler bug that broke my code... :classic_cheerleader:

Edited by Dalija Prasnikar
  • Haha 1

Share this post


Link to post

Classic undocked still unusable...

How much time would it need to allow users to manually increase the height of the main window, so that icons are not hidden - 30 second? Or 60 with testing?

  • Sad 1

Share this post


Link to post

They managed to bungle the fix(es) for StringGrid custom drawing again. I just had to adp my Delphi 10.4 fix in GExperts for that. Did nobody test theses fixes?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×