View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022277FPCCompilerpublic2012-06-16 12:042012-06-24 19:19
ReporterAlexander S. Klenin 
Assigned ToJonas Maebe 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusresolvedResolutionwon't fix 
PlatformOSOS Version
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0022277: Initialize variables with record-type constants
DescriptionIn the following code:

type
  TPoint = record x, y: Integer; end;
const
  CP: TPoint = (x: 1; y: 2);
var
  V1: TPoint = (x: 1; y: 2);
  V2: TPoint = CP;
begin
end.

the final initialization currently fails.

IMO allowing it would be an improvement.
TagsNo tags attached.
FPCOldBugId0
Fixed in Revision
Attached Files

- Relationships
duplicate of 0013256closedDaniĆ«l Mantione Record variable can not be initialized by named constant 
related to 0020823resolvedJonas Maebe Concatenated string const = illegal expression 
related to 0010828closedPeter Vreman Calculating typed Constants 

-  Notes
(0060665)
Jonas Maebe (manager)
2012-06-24 19:19

The semantics of a typed constant do not allow such expressions, and there is no way to define a symbolic record constant in Pascal.

- Issue History
Date Modified Username Field Change
2012-06-16 12:04 Alexander S. Klenin New Issue
2012-06-17 15:54 Marco van de Voort FPCOldBugId => 0
2012-06-17 15:54 Marco van de Voort Category FCL => Compiler
2012-06-24 19:06 Jonas Maebe Relationship added duplicate of 0013256
2012-06-24 19:15 Jonas Maebe Relationship added related to 0020823
2012-06-24 19:15 Jonas Maebe Relationship added related to 0010828
2012-06-24 19:19 Jonas Maebe Status new => resolved
2012-06-24 19:19 Jonas Maebe Resolution open => won't fix
2012-06-24 19:19 Jonas Maebe Assigned To => Jonas Maebe
2012-06-24 19:19 Jonas Maebe Note Added: 0060665



MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker