mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 20:19:33 +02:00
-- Zusammenführen von r39934 in ».«:
U compiler/defcmp.pas U compiler/node.pas U compiler/pexpr.pas A tests/webtbs/tw34037.pp -- Aufzeichnung der Informationen für Zusammenführung von r39934 in ».«: U . git-svn-id: branches/fixes_3_2@47421 -
This commit is contained in:
parent
f3b048007c
commit
f8e55c4350
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -17588,6 +17588,7 @@ tests/webtbs/tw33898.pp -text svneol=native#text/pascal
|
|||||||
tests/webtbs/tw33963.pp svneol=native#text/pascal
|
tests/webtbs/tw33963.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3402.pp svneol=native#text/plain
|
tests/webtbs/tw3402.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw34021.pp -text svneol=native#text/pascal
|
tests/webtbs/tw34021.pp -text svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw34037.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw34055.pp svneol=native#text/plain
|
tests/webtbs/tw34055.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3411.pp svneol=native#text/plain
|
tests/webtbs/tw3411.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw34124.pp svneol=native#text/pascal
|
tests/webtbs/tw34124.pp svneol=native#text/pascal
|
||||||
|
@ -289,7 +289,8 @@ implementation
|
|||||||
if assigned(tstoreddef(def_from).genconstraintdata) or
|
if assigned(tstoreddef(def_from).genconstraintdata) or
|
||||||
assigned(tstoreddef(def_to).genconstraintdata) then
|
assigned(tstoreddef(def_to).genconstraintdata) then
|
||||||
begin
|
begin
|
||||||
if def_from.typ<>def_to.typ then
|
{ constants could get another deftype (e.g. niln) }
|
||||||
|
if (def_from.typ<>def_to.typ) and not(fromtreetype in nodetype_const) then
|
||||||
begin
|
begin
|
||||||
{ not compatible anyway }
|
{ not compatible anyway }
|
||||||
doconv:=tc_not_possible;
|
doconv:=tc_not_possible;
|
||||||
|
@ -195,11 +195,13 @@ interface
|
|||||||
'specializen');
|
'specializen');
|
||||||
|
|
||||||
{ a set containing all const nodes }
|
{ a set containing all const nodes }
|
||||||
nodetype_const = [ordconstn,
|
nodetype_const = [niln,
|
||||||
|
ordconstn,
|
||||||
pointerconstn,
|
pointerconstn,
|
||||||
stringconstn,
|
stringconstn,
|
||||||
guidconstn,
|
guidconstn,
|
||||||
realconstn];
|
realconstn,
|
||||||
|
setconstn];
|
||||||
|
|
||||||
type
|
type
|
||||||
{ all boolean field of ttree are now collected in flags }
|
{ all boolean field of ttree are now collected in flags }
|
||||||
@ -657,7 +659,7 @@ implementation
|
|||||||
|
|
||||||
function is_constnode(p : tnode) : boolean;
|
function is_constnode(p : tnode) : boolean;
|
||||||
begin
|
begin
|
||||||
is_constnode:=(p.nodetype in [niln,ordconstn,realconstn,stringconstn,setconstn,pointerconstn,guidconstn]);
|
is_constnode:=(p.nodetype in nodetype_const);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1974,7 +1974,7 @@ implementation
|
|||||||
not is_objectpascal_helper(tdef(srsymtable.defowner)) then
|
not is_objectpascal_helper(tdef(srsymtable.defowner)) then
|
||||||
internalerror(2013011401);
|
internalerror(2013011401);
|
||||||
{ convert const node to temp node of the extended type }
|
{ convert const node to temp node of the extended type }
|
||||||
if node.nodetype in (nodetype_const+[niln,addrn]) then
|
if node.nodetype in (nodetype_const+[addrn]) then
|
||||||
begin
|
begin
|
||||||
extdef:=tobjectdef(srsymtable.defowner).extendeddef;
|
extdef:=tobjectdef(srsymtable.defowner).extendeddef;
|
||||||
newstatement:=nil;
|
newstatement:=nil;
|
||||||
|
21
tests/webtbs/tw34037.pp
Normal file
21
tests/webtbs/tw34037.pp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
program project1;
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, FGL;
|
||||||
|
|
||||||
|
type
|
||||||
|
TBaseClass = class (TObject)
|
||||||
|
end;
|
||||||
|
|
||||||
|
generic TFPGObjectListEx<T: TBaseClass> = class (specialize TFPGObjectList<T>)
|
||||||
|
function GetItemByID(AID: Integer): T;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TFPGObjectListEx.GetItemByID(AID: Integer): T;
|
||||||
|
begin
|
||||||
|
Result:=nil; //T(nil);
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user