[fpc-devel] Free Pascal 3.0.6

2018-07-31 Thread African Wild Dog
Hello,

Are there plans to release version 3.0.6 later this year?
There are bugs in 3.0.4 which makes the use of generics virtually
impossible (since you cannot use generics with inheritance): #34024
 and #34065
.

Overloaded operators with generics are limited by this bug: #34030
.

Because of these errors I had to interrupt the port of a relatively large
Delphi project that makes extensive use of generics with inheritance.

Regards
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Operator overload error when using type restrictions

2018-07-25 Thread African Wild Dog
Em quarta-feira, 25 de julho de 2018, Sven Barth via fpc-devel <
fpc-devel@lists.freepascal.org> escreveu:
>
> With what compiler version did you test? Cause with trunk your example
works here...
>

I have tested with 3.0.4 version.

Regards
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Operator overload error when using type restrictions

2018-07-24 Thread African Wild Dog
Hello,

Please confirm if this is a bug or my mistake.
When i try to overload a assignment operator on a generic class with type
restriction i get this error: "Impossible to overload assignment for equal
types". However, if i remove the type restriction, the compiles.

 CODE (compiles) ===

program generic_without_type_restriction;

{$MODE objfpc}
{$MODESWITCH AdvancedRecords}

type

  generic Weak = record
  private
FValue: T;
  public
class operator := (const value: T): specialize Weak; inline;
  end;

class operator Weak.:=(const value: T): specialize Weak;
begin
  Result.FValue := Value;
end;

begin
end.



 CODE (doesn't compiles) ===

program generic_with_type_restriction ;

{$MODE objfpc}
{$MODESWITCH AdvancedRecords}

type

  generic Weak = record
  private
FValue: T;
  public
class operator := (const value: T): specialize Weak; inline;
  end;

class operator Weak.:=(const value: T): specialize Weak;
begin
  Result.FValue := Value;
end;

begin
end.



Regards
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Improvments to HTML Web Module

2018-03-03 Thread African Wild Dog
2018-03-03 6:31 GMT-03:00 Michael Van Canneyt :

>
> I suppose you mean TCustomHTMLModule ?
>
>
Exactly. Sorry for my typo. I mean TCustomHTMLModule.


>
> I have fixed 1 by descending TCustomHTMLModule from TSessionHTTPModule. It
> originally had support for sessions. That it lost this support was the
> result of a refactoring of session support... This is now fixed.
> See revision 38397.
>

Perfect.


> As for 2, what do you mean by this ? TCustomHTMLModule already supports
> HTML Content actions.
> If you planned to actually add it to TCustomHTMLModule: No, that is not OK.
>
>
HTML content actions are not used by the TCustomHTMLModule. If you have a
module called "mymodule" and an action called "myaction", when you access
the address "/mymodule/myaction", the event OnGetContent of the WebModule
is always executed but, the OnGetContent event of the action is never
executed. This is by design. I would like to fix it.


Regards
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Improvments to HTML Web Module

2018-03-02 Thread African Wild Dog
I would like to propose (and develop, if authorized) the following
improvements to the web module specialized in generating HTML content
(TCustomHTTPModule):

1 - Add support for sessions;
2 - Add support for the use of actions (THTMLContentAction)

Regards
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel