View Issue Details

IDProjectCategoryView StatusLast Update
0037525FPCRTLpublic2020-08-09 19:01
ReporterOndrej Pokorny Assigned ToOndrej Pokorny  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037525: TWriter doesn't stream stored 0 Int64 values
DescriptionThe "nodefault" modifier doesn't work for Int64 values.
Steps To Reproduceprogram NoDefault;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}
  Classes
  { you can add units after this };

type
  TTest = class(TComponent)
  private
    fTest: Int64;
    function TestStored: Boolean;
  published
    property Test: Int64 read fTest write fTest stored TestStored nodefault;
  end;

{ TTest }

function TTest.TestStored: Boolean;
begin
  Result := fTest<>100;
end;

var
  xStream: TStringStream;
  xWriter: TWriter;
  C: TTest;
begin
  xStream := TStringStream.Create('');
  C := TTest.Create(nil);
  C.Test := 0;
  xWriter := TWriter.Create(xStream, 1024);
  xWriter.WriteDescendent(C, nil);
  C.Free;
  xWriter.Free;
  Writeln(xStream.DataString);
  xStream.Free;
  ReadLn;
end.
TagsNo tags attached.
Fixed in Revision46337
FPCOldBugId
FPCTarget3.2.2
Attached Files

Relationships

related to 0031985 closedMichael Van Canneyt TWriter doesn't stream stored empty strings 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-08-09 08:01 Ondrej Pokorny New Issue
2020-08-09 08:01 Ondrej Pokorny Status new => assigned
2020-08-09 08:01 Ondrej Pokorny Assigned To => Ondrej Pokorny
2020-08-09 08:01 Ondrej Pokorny Relationship added related to 0031985
2020-08-09 08:13 Ondrej Pokorny Status assigned => resolved
2020-08-09 08:13 Ondrej Pokorny Resolution open => fixed
2020-08-09 08:13 Ondrej Pokorny Fixed in Revision => 46337
2020-08-09 08:13 Ondrej Pokorny FPCTarget => -
2020-08-09 08:13 Ondrej Pokorny Status resolved => closed
2020-08-09 12:40 Jonas Maebe Fixed in Version => 3.3.1
2020-08-09 19:00 Ondrej Pokorny Status closed => feedback
2020-08-09 19:00 Ondrej Pokorny Resolution fixed => open
2020-08-09 19:00 Ondrej Pokorny FPCTarget - => 3.2.2
2020-08-09 19:01 Ondrej Pokorny Status feedback => closed
2020-08-09 19:01 Ondrej Pokorny Resolution open => fixed