mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 11:49:24 +02:00
Fix for Mantis #25600.
ptype.pas, read_named_type.array_dec: * generate a valid range definition if we are inside a generic and the array bounds are not ordinals (Note: the check for "parse_generic" should be improved to really detect erratic indexes that are not related to generics in any way) + added test git-svn-id: trunk@27532 -
This commit is contained in:
parent
02495c17bd
commit
b0670ee34c
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13897,6 +13897,7 @@ tests/webtbs/tw25398.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2540.pp svneol=native#text/plain
|
tests/webtbs/tw2540.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw25551.pp svneol=native#text/plain
|
tests/webtbs/tw25551.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw25598.pp svneol=native#text/plain
|
tests/webtbs/tw25598.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw25600.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw25603.pp svneol=native#text/pascal
|
tests/webtbs/tw25603.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2561.pp svneol=native#text/plain
|
tests/webtbs/tw2561.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw25610.pp -text svneol=native#text/plain
|
tests/webtbs/tw25610.pp -text svneol=native#text/plain
|
||||||
|
@ -1286,7 +1286,10 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not parse_generic then
|
if not parse_generic then
|
||||||
Message(type_e_cant_eval_constant_expr);
|
Message(type_e_cant_eval_constant_expr)
|
||||||
|
else
|
||||||
|
{ we need a valid range for debug information }
|
||||||
|
range_to_type(lowval,highval,indexdef);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Message(sym_e_error_in_type_def)
|
Message(sym_e_error_in_type_def)
|
||||||
|
19
tests/webtbs/tw25600.pp
Normal file
19
tests/webtbs/tw25600.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ %NORUN }
|
||||||
|
{ %OPT=-g }
|
||||||
|
|
||||||
|
program tw25600;
|
||||||
|
|
||||||
|
{$MODE DELPHI}
|
||||||
|
|
||||||
|
type
|
||||||
|
// maybe related to
|
||||||
|
// http://bugs.freepascal.org/view.php?id=25599
|
||||||
|
// http://bugs.freepascal.org/view.php?id=24848
|
||||||
|
TC<T> = class
|
||||||
|
public
|
||||||
|
class var F: array[0..T.X] of byte; // for normal fields all is ok
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin // Fatal: Internal error 200601281
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user