* UnicodeToUtf8: calculate UCS4 value without three (!) temp string variables. Also removed separate word-sized variable and unsigned subtractions.
git-svn-id: trunk@20268 -
When parsing an inline specialization inside a generic we need to
respect the "parsedtype" parameter which tells us whether the first
generic parameter was already parsed. This fixes Mantis #20871 .
+ added test for this
git-svn-id: trunk@20251 -
For the solution symbols will now contain a "sp_explicitrename" flag if they
were created through a type rename. This is necessary, because we can't
decide whether a type is a renamed generic para which contains by default a
reference to the default undefined def. Using individual undefined defs will
lead to duplicate identifiers as they are created before a symtable was
pushed (thus they'll ba part of whatever symtable is at the top).
+ symconst.pas, tsymoption:
Add a new option "sp_explicitrename" which will be used to track type
renames.
+ pdecl.pas, type_dec:
Set the new flag if we're dealing with a type rename
* pexpr.pas, factor_read_id:
If we have an undefined def that is also a rename then we assume that
it's a rename of a generic parameter
* utils/ppudump.pp:
Adjustment because of change to tsymoption
* utils/ppu.pp:
Increase PPU version
+ added test
git-svn-id: trunk@20250 -
- Remove unneeded check for "parse_generic" (it's already checked in the outer if-clause).
+ Check whether we are trying to specialize one of the surrounding type declarations of a
nested type (as long as nested generics are forbidden this is always the outermost generic
or specialization). This check can not rely on the symbol, because while parsing the
generic or the specialization the symbol's def is still an errordef. This fixes
Mantis #19498 .
+ Added test from bug report.
git-svn-id: trunk@20247 -
When specializing a generic the references from unitsyms to the loaded modules
needs to be reestablished, so that "unitidentifier.identifier" can be used
inside a generic without leading to an access violation.
Only global units are checked, because a generic must not use symbols from the
static symtable or from units used by the implementation section (the latter is
currently not checked)
+ added tests for the above problem for "normal" units as well as units with a namespace
git-svn-id: trunk@20245 -
* Assume code page of empty addend matching the destination (StringCodePage returns value of DefaultSystemCodePage for empty strings, causing unnecessary conversions if another addend has a non-default code page).
* Moved part with temp Unicodestring variables into separate procedure in order to avoid an implicit try..finally block in primary control flow.
* Renamed Size and Location varialbles into S1Len and S2Len.
git-svn-id: trunk@20230 -