diff --git a/.gitattributes b/.gitattributes index 23814d8bcf..b8420aefba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17787,6 +17787,7 @@ tests/webtbs/tw35937.pp svneol=native#text/plain tests/webtbs/tw3594.pp svneol=native#text/plain tests/webtbs/tw3595.pp svneol=native#text/plain tests/webtbs/tw35953.pp svneol=native#text/pascal +tests/webtbs/tw35965.pp svneol=native#text/pascal tests/webtbs/tw3612.pp svneol=native#text/plain tests/webtbs/tw3617.pp svneol=native#text/plain tests/webtbs/tw3619.pp svneol=native#text/plain diff --git a/rtl/inc/objpas.inc b/rtl/inc/objpas.inc index 9d7e88a1ea..54579f6fd5 100644 --- a/rtl/inc/objpas.inc +++ b/rtl/inc/objpas.inc @@ -980,10 +980,17 @@ type TClassTypeInfo = {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}packed{$endif}record Attributes: Pointer; - ClassType: TClass; - ParentInfo: Pointer; - PropCount: SmallInt; - UnitName: ShortString; + case TTypeKind of + tkClass: ( + ClassType: TClass; + ParentInfo: Pointer; + PropCount: SmallInt; + UnitName: ShortString; + ); + { include for proper alignment } + tkInt64: ( + Dummy: Int64; + ); end; PClassTypeInfo = ^TClassTypeInfo; var diff --git a/tests/webtbs/tw35965.pp b/tests/webtbs/tw35965.pp new file mode 100644 index 0000000000..1002e79f41 --- /dev/null +++ b/tests/webtbs/tw35965.pp @@ -0,0 +1,6 @@ +program tw35965; + +begin + if TObject.UnitName <> 'System' then + Halt(1); +end.