Skip to content

Generics not allowed on types or other non-class , record, procedural types. #214

Description

@Schmitty2005

I do not know if this is an issue ,a Blaise decision, or just not implemented yet :

{$MODE DELPHI}
program ga;

uses sysutils;

type
  TgenericArray<T> = array of T;   <--ERROR
begin
end.

With Blaise :

$ ./blaise --source ga.pas --output ga
Parse error: Generic type must be a class, record, or interface, or a procedural type at line 7 col 22 in ga.pas

And with FPC :

$ fpc ga.pas
Free Pascal Compiler version 3.2.2+dfsg-32 [2024/01/05] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling ga.pas
Linking ga
10 lines compiled, 0.1 sec

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions