> On Jun 8, 2023, at 6:01 PM, Sven Barth wrote:
>
> Please report a bug with a complete example.
Better late than never :)
https://gitlab.com/freepascal.org/fpc/source/-/issues/40321
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lis
Am 07.06.2023 um 10:44 schrieb Hairy Pixels via fpc-pascal:
I'm curious, why doesn't the following code give a warning? Shouldn't the compiler know
you're assigning to "r" which hasn't been initialized yet?
type
TMyClass = class
x: integer;
end;
procedure MyProc
> On Jun 8, 2023, at 12:58 AM, Steve Litt via fpc-pascal
> wrote:
>
> I know this isn't a very satisfying answer, but it's the best I can
> come up with.
Thanks but this is probably a question for the compiler devs. I'm curious if
it's intended, a bug or not implemented. Seems like an obvio
Hairy Pixels via fpc-pascal said on Wed, 7 Jun 2023 15:44:43 +0700
>I'm curious, why doesn't the following code give a warning? Shouldn't
>the compiler know you're assigning to "r" which hasn't been
>initialized yet?
>
>type
> TMyClass = class
> x: integer;
> end;
>
>proc
I'm curious, why doesn't the following code give a warning? Shouldn't the
compiler know you're assigning to "r" which hasn't been initialized yet?
type
TMyClass = class
x: integer;
end;
procedure MyProcedure;
var
r: TMyClass;
begin
r.x := 1;
end;