Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,357
    • Issues 1,357
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 71
    • Merge requests 71
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #38642
Closed
Open
Issue created Mar 20, 2021 by FPC Admin account@fpc_adminOwner

Generics stumble upon non-sequential enums.

Original Reporter info from Mantis: DonAlfredo @DonAlfredo
  • Reporter name: Alfred

Description:

When using a non-sequential enum together with generics, an [compiler] error is generated.

program projectenum;
{$mode delphi}{$H+}
uses
  classes,
  generics.collections;
type
  TMonthType = (January, February, May=10, June, July);
  TMonthList = TList<TMonthType>;
var
  myList : TMonthList;
begin
end.

Results in:
generics.defaults.pas(1051,43) Error: No type info available for this type

If "=10" is removed, all is well.

Additional information:

See:
https://forum.lazarus.freepascal.org/index.php/topic,53763.msg398264
https://forum.lazarus.freepascal.org/index.php/topic,41736.msg398268.html#msg398268

Mantis conversion info:

  • Mantis ID: 38642
  • Fixed in version: 3.3.1
  • Fixed in revision: 49064 (#ca7c775e)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking