Commit Graph

7 Commits

Author SHA1 Message Date
Sven/Sarah Barth
2a5023508a + add support for forward declarations of generic classes and interfaces (any implicit pointer type really); fixes #34128 2022-02-18 17:54:23 +01:00
Sven/Sarah Barth
3444b23c9a + add a method to retrieve a copy of a specialization context 2022-02-18 17:53:35 +01:00
svenbarth
60345366f2 * fix for Mantis #35140: apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
+ added tests

git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
svenbarth
c81eda7a42 Fully enable generic functions, procedures and methods by allowing inline specializations in procedure bodies as well.
Please note that this now also includes inline specializations of types in non-Delphi modes, thus removing a difference between modes Delphi and non-Delphi

pgentype.pas, inline_specialization_block_types:
  + add bt_body as valid block type

git-svn-id: trunk@32439 -
2015-11-21 16:52:09 +00:00
svenbarth
89d37c1e69 pgentype.pas:
+ new constant inline_specialization_block_types to easily keep track of block types in which inline specialization is allowed
pexpr.pas:
  * use new inline_specializatio_block_types instead of a inline constant set

git-svn-id: trunk@32388 -
2015-11-21 11:05:58 +00:00
svenbarth
eaab604f0c pgenutil.pas:
* split generate_specialization() into two phases: generate_specialization_phase1() and generate_specialization_phase2(); the former parses the generic parameters and determines the correct generic def while the latter does the real specialization. This is needed for generic functions/methods as no full specialization needs to be done until overload selection by tcallcandidates
pgentype.pas:
  + new type tspecializationcontext

git-svn-id: trunk@31514 -
2015-09-04 15:37:54 +00:00
svenbarth
e8fca1c9c0 * move tspecializationstate from pgenutil.pas into a new unit named pgentype.pas which contains types related to generics with as few dependencies as possible.
git-svn-id: trunk@31507 -
2015-09-04 13:37:06 +00:00