Previously we only autmatically called procvars without parameters in TP/Delphi
modes if their result type was equal to the parameter type to which they were
passed. Resolves#39748.
The main adjustments were as follows:
- fixing coding style and identation
- fixing some typos
- using a better name for the property in tcallcandidates which holds the symbols created for anonymous parameter values
+ added tests
The following rules for using these operator overloads as *implicit* overloads apply (Delphi compatible):
- if a found assignment operator returns a default ShortString then that is used
- if only one assignment operator to a String[x] is found then that is used
- otherwise the assignment is not possible
The explicit assignment checks for an exact match (and falls back for an implicit assignment). This is not entirely Delphi compatible as Delphi seems to favor the first found symbol in that case, but sometimes also not... :/
git-svn-id: trunk@47634 -
o fixes several places where there was a check whether something is a
fieldvarsym, but not whether it's an instance rather than a class field
git-svn-id: trunk@43786 -
o use this to handle non-power-of-two-sized parameters for llvm
o no general support in the parser/code generator, so don't expose
git-svn-id: trunk@40398 -
An uninitialized function Result of a managed type needs special handling.
When passing it as a var parameter a warning need to be emitted, since a user
may expect Result to be empty (nil) by default as it happens with local vars
of a managed type. But this is not true for Result and may lead to serious issues.
The only exception is SetLength(Result, ?) for a string Result. A user always
expects undefined contents of the string after calling SetLength(). In such
case a hint need to be emitted.
+ Tests for this.
git-svn-id: trunk@40216 -
(mantis #32179)
- removed code to handle conversion to formaldef parameters that are not by
reference (so the default conversion preference is kept)
git-svn-id: trunk@40012 -
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
their enum name, instead of number
git-svn-id: trunk@36174 -
only used in combination with subscriptn/vecn to determine whether the
target is assignable (and we return true immediately if you subscript
or index an implicit pointer type -- also for classrefdef now)
o disallow assigning something to fields of records returned by functions
(that would be assigned to a temp and get lost anyway)
git-svn-id: trunk@35313 -
where it used to be set to true (dereferencing a pointer always means
that regardless of what the pointer was, the resut is assignable)
(mantis #22979)
o also removed gotpointer, since it was only used in combination with
gotderef
git-svn-id: trunk@35308 -
the scope penalty relative to the nearest symtable that contains one of
the applicable overloads, rather than relative to the nearest symtable
that simply contains a method with this name (based on patch by
Maciej Izak, mantis #25607)
git-svn-id: trunk@35089 -