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 6838299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:34:48+00:00 2026-05-26T23:34:48+00:00

I am upgrading some legacy 3rd party components from Delphi 6 source up to

  • 0

I am upgrading some legacy 3rd party components from Delphi 6 source up to XE2.

The 3rd party source has nested class function within a class procedure. Mock up exact working copy which will fail:

type
  TMyClass1 = class
  public
    class procedure DoSomething;
  end;

{ TMyClass1 }

class procedure TMyClass1.DoSomething;
  class function DoSomethingelse: boolean;
  begin
    result := false;
  end;
begin

end;

trying to compile this gives an error about doSomethingelse being an undeclared identifier. Now I can (presumably) resolve this by pulling the nested function out to the same level, but is there a compiler option that I can set to prevent this? Is this something which has recently changed? Has anyone else come across this issue?

Thanks

  • 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-26T23:34:48+00:00Added an answer on May 26, 2026 at 11:34 pm

    In order to compile your code in XE2 just remove the class Keyword of the DoSomethingelse definition, even if this code compile in older versions of delphi (I tested your code in Delphi 5, 7 and 2007) I don’t see the point (or difference) of declare a embedded (inner) procedure or function with the class keyword.

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

Sidebar

Related Questions

I am just upgrading some old code written in Delphi 6 to Delphi XE2.
After seeing some of the problems that Microsoft has had upgrading people from Internet
I'm upgrading some ancient (from 2003) Delphi code to Delphi Architect XE and I'm
We have some imported data from a 3rd party which provides non-integer unique ids.
I have encountered a weird situation while updating/upgrading some legacy code. I have a
Going through some of my older Delphi projects and upgrading them to D2009, as
We are upgrading our XL C/C++ compiler from V8.0 to V10.1 and found some
Upgrading from GWT 2.3 to 2.4 caused a client-side exception in a class of
I am upgrading my site from some old spaghetti coding to some nice, clean
I am upgrading project from 1.1 to 3.5. There are some references left to

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.