[fpc-devel] Tests in Delphi XE3 regarding Type Helpers
Marco van de Voort
marcov at stack.nl
Thu Nov 29 10:07:21 CET 2012
In our previous episode, Sven Barth said:
>
> Could someone with access to Delphi XE3 please compile and run the
> attached tests and provide me with the output of the test or (in case of
> an error) with the output of the compiler?
> The tthlperrX.pas tests should not compile, so here I'd like to get the
> error messages.
> The other tests should compile, so please try to adjust them until they
> do and report me any adjustments you made. If you can't get them to
> compile then please report me the errors you get with the initial test file.
D:\testing\rechelp>dcc32 tthlperr1.pas
Embarcadero Delphi for Win32 compiler version 24.0
Copyright (c) 1983,2012 Embarcadero Technologies, Inc.
tthlperr1.pas(4) Error: E2018 Record, object or class type required
tthlperr1.pas(6)
D:\testing\rechelp>dcc32 tthlperr2.pas
Embarcadero Delphi for Win32 compiler version 24.0
Copyright (c) 1983,2012 Embarcadero Technologies, Inc.
tthlperr2.pas(14) Error: E2018 Record, object or class type required
tthlperr2.pas(15) Error: E2018 Record, object or class type required
tthlperr2.pas(17)
D:\testing\rechelp>dcc32 tthlpminus.pas
Embarcadero Delphi for Win32 compiler version 24.0
Copyright (c) 1983,2012 Embarcadero Technologies, Inc.
tthlpminus.pas(14) Error: E2018 Record, object or class type required
tthlpminus.pas(15) Error: E2018 Record, object or class type required
tthlpminus.pas(17)
1. Typecasting the "42" literals to integer works
2. changing record helper type to "int64" doesn't.
3. Changing to smaller types (int8,int16) doesn't help.
4. changing to uint8 works for the "42" one, not for the "-42" one.
D:\testing\rechelp>dcc32 tthlpself.pas
Embarcadero Delphi for Win32 compiler version 24.0
Copyright (c) 1983,2012 Embarcadero Technologies, Inc.
tthlpself.pas(36)
37 lines, 0.09 seconds, 18816 bytes code, 13240 bytes data.
D:\testing\rechelp>tthlpself
-> throws RTE 105
D:\testing\rechelp>dcc32 tthlpsize.pas
Embarcadero Delphi for Win32 compiler version 24.0
Copyright (c) 1983,2012 Embarcadero Technologies, Inc.
tthlpsize.pas(24) Error: E2003 Undeclared identifier: 'Short'
tthlpsize.pas(78) Error: E2015 Operator not applicable to this operand type
tthlpsize.pas(80) Error: E2015 Operator not applicable to this operand type
tthlpsize.pas(82) Error: E2015 Operator not applicable to this operand type
tthlpsize.pas(84) Error: E2015 Operator not applicable to this operand type
tthlpsize.pas(87)
The first is easily fixable by changing short (which probably should have
been shortint) to int16.
The remaining errors are the negative values. I didn't find a solution for
them with tthlpminus
More information about the fpc-devel
mailing list