View Issue Details

IDProjectCategoryView StatusLast Update
0030517FPCCompilerpublic2016-08-25 22:54
Reportersilvioprog Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionsuspended 
Product Version3.1.1 
Summary0030517: TYPEDADDRESS should be ON in mode DELPHI
DescriptionHello,

Consider the following type:

=== begin code ===

type
  a = record
    b: Byte;
  end;

const
  c: a = (b: 10);

begin
  Writeln(c.b); // print 10
end.

=== end code ===

On Delphi, if you try:

=== begin code ===

begin
  c.b := 20;
end;

=== end code ===

you get:

=== begin log ===

E2064 Left side cannot be assigned to

=== end log ===

On FPC, it compiles properly in a unit declared as mode DELPHI.

What do you think about TYPEDADDRESS=ON as default in mode Delphi?
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

silvioprog

2016-08-25 22:09

reporter   ~0094312

Omg, please remove this issue please, I'll reissue it, I meant "WRITEABLECONST=OFF" instead of "TYPEDADDRESS=ON", damn fast Ctrl+V. :-p

silvioprog

2016-08-25 22:15

reporter   ~0094313

Correct issue: http://bugs.freepascal.org/view.php?id=30518 . Now you can remove this issue entirely.

Issue History

Date Modified Username Field Change
2016-08-25 22:04 silvioprog New Issue
2016-08-25 22:09 silvioprog Note Added: 0094312
2016-08-25 22:15 silvioprog Note Added: 0094313
2016-08-25 22:54 Jonas Maebe Status new => closed
2016-08-25 22:54 Jonas Maebe Assigned To => Jonas Maebe
2016-08-25 22:54 Jonas Maebe Resolution open => suspended