The patch http://hg.blaise.ru/public/fpc/rev/0a8aff8d8273 (attached) fixes the
following:
---8<---
{$Mode Delphi}
type R = record
var X: Integer;
function Foo: Integer;
end;
function R.Foo: Integer;
begin
result := X
end;
var F: function : Integer of
Michael Van Canneyt via fpc-devel schrieb
am Mi., 16. Dez. 2020, 12:47:
> We can of course consider changing the current behaviour in the future, as
> far as I
> know there is no urgency in this ATM. There are other, more urgent tasks...
>
I agree. Please concentrate on anonymous functions and
The patch http://hg.blaise.ru/public/fpc/rev/544a934d262e (attached) fixes the
following:
---8<---
{$Mode Delphi}
type G = class
var X: T;
// EXPECTED: gets compiled
// ACTUAL: 'Error: Generics without specialization cannot be used as a
type for a variable'
Am 16.12.2020 um 17:09 schrieb Blaise--- via fpc-devel:
The patch http://hg.blaise.ru/public/fpc/rev/544a934d262e (attached)
fixes the following:
---8<---
{$Mode Delphi}
type G = class
var X: T;
// EXPECTED: gets compiled
// ACTUAL: 'Error: Generics without specialization
Am 16.12.2020 um 15:01 schrieb Blaise--- via fpc-devel:
The patch http://hg.blaise.ru/public/fpc/rev/0a8aff8d8273 (attached)
fixes the following:
---8<---
{$Mode Delphi}
type R = record
var X: Integer;
function Foo: Integer;
end;
function R.Foo: Integer;
begin
result := X
On Wed, 16 Dec 2020 10:24:39 +0100 (CET)
Michael Van Canneyt via fpc-devel
wrote:
>[...]
> Function MyResult : String;
>
> begin
>Result:='';
>MyResult:='';
> end;
>
> You can still use the function name for the result, so "Result" is in
> fact an alias for the function name, which is
On 16.12.2020 12:24, Michael Van Canneyt via fpc-devel wrote:
To be correct: Result is not the name of the result value, it is an alias.
I did not dispute that. The important point here is: "an alias" to /what/?
You can still use the function name for the result, so "Result" is in fact an
On 16.12.2020 0:07, Sven Barth wrote:
No, those two are in fact correct this way.
Is that the /team's/ consensus?
The modeswitch Result enables the use of Result as an alias for *any* routine …
Incorrect. The identifier Result does not alias the routine, it aliases the
routine's return
On Wed, 16 Dec 2020, Blaise--- via fpc-devel wrote:
On 16.12.2020 0:07, Sven Barth wrote:
No, those two are in fact correct this way.
Is that the /team's/ consensus?
The modeswitch Result enables the use of Result as an alias for *any*
routine …
Incorrect. The identifier Result does
Blaise--- via fpc-devel schrieb am Mi.,
16. Dez. 2020, 10:14:
> > The modeswitch Result enables the use of Result as an alias for *any*
> routine …
>
> Incorrect. The identifier Result does not alias the routine, it aliases
> the routine's return value.
>
For non operators the routine's name
On Wed, 16 Dec 2020, Blaise--- via fpc-devel wrote:
On 16.12.2020 12:24, Michael Van Canneyt via fpc-devel wrote:
To be correct: Result is not the name of the result value, it is an alias.
But, conceptually, I would rather look at the function name resolving to the
return value as a
On 2020-12-16 12:25, Blaise--- via fpc-devel wrote:
On 16.12.2020 12:24, Michael Van Canneyt via fpc-devel wrote:
To be correct: Result is not the name of the result value, it is an
alias.
I did not dispute that. The important point here is: "an alias" to
/what/?
You can still use the
12 matches
Mail list logo