Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 990925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:01:31+00:00 2026-05-16T06:01:31+00:00

In some code I am fixing up, which makes heavy use of generics and

  • 0

In some code I am fixing up, which makes heavy use of generics and interfaced types, I am getting error

 E2134, Type '<void>' has no type info.

I believe it is because I am in the middle of a refactor where some deeply nested set of units that all use generics are out of sync, but the error is not happening in a place where I can make use of the error message to fix the code, because there is nothing wrong with the code, at the location where the error is appearing.

Here is the context, mocked up, because I can not post the code, there is too much:

 unit GenericThing;
 ...
 interface
 ...
 type
 ...
 IThingListOf<ThingT> = interface( IThingContainer )
    function  getEnumerator: TEnumerator<ThingT>;
    function  getCount: Integer;
    function  getThing( Index: integer ): ThingT;
    function  getFirst: ThingT;
      function  IndexOf( value: ThingT): integer;
    function  addItem( const Thing: ThingT ): ThingT;
      function  removeItem( const Thing: ThingT ): Integer;
    procedure clear;
    procedure Sort; overload;
    procedure Sort(const AComparer: IComparer<ThingT>); overload;
    property  Count: integer read getCount;
    property  First: ThingT read getFirst;
    property  Items[Index: integer]: ThingT read getThing; default;
  end;

 // error appears on whatever line number comes after the declaration of  IThingListOf<ThingT>...end; 
  function AnythingYouLikeHere:Integer; // there is nothign wrong with this line, but you get the E2134 here.

It appears that the problem is in IThingContainer itself:

   IThingContainer = interface ...
       ...
       procedure DoSomething(const Param);
   end;

THe above “const Param” has no type information. This is a weird (armpit) of Pascal/Delphi in my opinion, where you completely violate Wirth’s idea of strong typing. It is about as weakly typed as a “void *” pointer in C, or the “Pointer” type in Delphi, but it is rarely used, except for in places like the standard pre-object-pascal RTL functions like Move, and so on. In my opinion, untyped parameters in interfaces, used in generics, should either be allowed, or disallowed, but not allowed sometimes, and disallowed other times.

This is a case of a Pascal feature from 1978 mixing badly with an ObjectPascal feature from 2009.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:01:32+00:00Added an answer on May 16, 2026 at 6:01 am

    The error message means there’s no type info available for the given type.

    Here’s a minimal program which produces the message:

    type
      {$M+}
      IThing = interface
        procedure P(const X);
      end;
      {$M-}
    begin
    end.
    

    The problem, it would appear, is that IThingListOf<>, or one of its ancestors, was compiled with {$M+} active. The compiler presumes from this that you really want full type info for the interface; originally it was used by SOAP etc. support to produce stubs etc. The interface RTTI doesn’t support untyped parameters (logically enough, they can’t be marshalled by SOAP etc.) – and they show up as being of void type, and you end up with this error message.

    The solution is to either not use {$M+} – though presumably the RTTI is being used, otherwise it wouldn’t be enabled – or use e.g. Pointer instead, and pass the address explicitly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am observing a strange bug in some of my code which I suspect
I have a Windows Service program running in Release mode that runs 24/7 which
I am having trouble fixing a bug in an existing ASP.NET MVC web site.
I saw a comment on another question (I forget which one) encouraging the asker
Ok, so I've been refactoring my code in my little Rails app in an
More jQuery Tools overlay fun... I have a yes/no jQT modal dialog set up
We are using an extractor application that will export data from the database to
I have a 'tabbed' style web page where once the page loads each tab
I am using ValueInjecter to map properties from a Domain model to a DTO
So Qt is compiled with /Zc:wchar_t- on windows. What this means is that instead

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.