|
@@ -490,7 +490,18 @@ implementation
|
|
begin
|
|
begin
|
|
if not assigned(left) or (left.nodetype<>typen) then
|
|
if not assigned(left) or (left.nodetype<>typen) then
|
|
internalerror(2012032102);
|
|
internalerror(2012032102);
|
|
|
|
+
|
|
def:=ttypenode(left).typedef;
|
|
def:=ttypenode(left).typedef;
|
|
|
|
+ if df_generic in current_procinfo.procdef.defoptions then
|
|
|
|
+ begin
|
|
|
|
+ { don't allow as a default parameter value }
|
|
|
|
+ if block_type<>bt_const then
|
|
|
|
+ result:=cpointerconstnode.create(0,def)
|
|
|
|
+ else
|
|
|
|
+ result:=cerrornode.create;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+
|
|
result:=nil;
|
|
result:=nil;
|
|
case def.typ of
|
|
case def.typ of
|
|
enumdef,
|
|
enumdef,
|
|
@@ -505,16 +516,7 @@ implementation
|
|
pointerdef:
|
|
pointerdef:
|
|
result:=cpointerconstnode.create(0,def);
|
|
result:=cpointerconstnode.create(0,def);
|
|
procvardef:
|
|
procvardef:
|
|
- if df_generic in current_procinfo.procdef.defoptions then
|
|
|
|
- begin
|
|
|
|
- { don't allow as a default parameter value }
|
|
|
|
- if block_type<>bt_const then
|
|
|
|
- result:=cpointerconstnode.create(0,def)
|
|
|
|
- else
|
|
|
|
- result:=cerrornode.create;
|
|
|
|
- exit;
|
|
|
|
- end
|
|
|
|
- else if tprocvardef(def).size<>sizeof(pint) then
|
|
|
|
|
|
+ if tprocvardef(def).size<>sizeof(pint) then
|
|
result:=getdefaultvarsym(def)
|
|
result:=getdefaultvarsym(def)
|
|
else
|
|
else
|
|
result:=cpointerconstnode.create(0,def);
|
|
result:=cpointerconstnode.create(0,def);
|