So what's up with

So what's up with

type TFoo = TBar;

not being allowed?

Comments

  1. The type cannot declared without class () - I think I've read why once, but can't remember who said what.

    ReplyDelete
  2. So no way of aliasing a generic type. I guess it may be related to the weird requirement that generic methods can't reference local functions.

    The more I use generics in Delphi the more I sense the gigantic hack they did to make their compiler support it.

    ReplyDelete
  3. Ya, and why non-class functions and procedures can't use generics.

    ReplyDelete
  4. It is probably related to resolving the actual types and sort which that are the same, and which that are not.

    ReplyDelete
  5. You cannot even alias a generic type -.-

    ReplyDelete

Post a Comment