mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 13:59:28 +02:00
compiler: allow "with" to search members in nested types properly
git-svn-id: trunk@18987 -
This commit is contained in:
parent
3cc6ac9e3b
commit
7dd8a97487
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9904,6 +9904,7 @@ tests/test/tclass13a.pp svneol=native#text/plain
|
||||
tests/test/tclass13b.pp svneol=native#text/plain
|
||||
tests/test/tclass14a.pp svneol=native#text/pascal
|
||||
tests/test/tclass14b.pp svneol=native#text/pascal
|
||||
tests/test/tclass15.pp svneol=native#text/pascal
|
||||
tests/test/tclass2.pp svneol=native#text/plain
|
||||
tests/test/tclass3.pp svneol=native#text/plain
|
||||
tests/test/tclass4.pp svneol=native#text/plain
|
||||
|
@ -2047,7 +2047,7 @@ implementation
|
||||
((FProcSymtable.symtabletype=withsymtable) and
|
||||
(FProcSymtable.defowner.typ in [objectdef,recorddef]))
|
||||
) and
|
||||
(FProcSymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable]) and
|
||||
(FProcSymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable,objectsymtable,recordsymtable]) and
|
||||
FProcSymtable.defowner.owner.iscurrentunit then
|
||||
contextstructdef:=tabstractrecorddef(FProcSymtable.defowner)
|
||||
else
|
||||
|
@ -1994,7 +1994,7 @@ implementation
|
||||
if (srsymtable.symtabletype=withsymtable) and
|
||||
assigned(srsymtable.defowner) and
|
||||
(srsymtable.defowner.typ in [recorddef,objectdef]) and
|
||||
(srsymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable]) and
|
||||
(srsymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable,objectsymtable,recordsymtable]) and
|
||||
(srsymtable.defowner.owner.iscurrentunit) then
|
||||
contextstructdef:=tabstractrecorddef(srsymtable.defowner)
|
||||
else
|
||||
|
26
tests/test/tclass15.pp
Normal file
26
tests/test/tclass15.pp
Normal file
@ -0,0 +1,26 @@
|
||||
{ %norun }
|
||||
program tclass15;
|
||||
|
||||
{$MODE DELPHI}
|
||||
|
||||
uses
|
||||
Classes;
|
||||
|
||||
type
|
||||
TMyClass=class
|
||||
private
|
||||
type
|
||||
TMyMemoryStream=class(TCustomMemoryStream) end;
|
||||
public
|
||||
procedure MyProc;
|
||||
end;
|
||||
|
||||
procedure TMyClass.MyProc;
|
||||
begin
|
||||
with TMyMemoryStream.Create do
|
||||
SetPointer(nil,0)
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user