On Sat, 12 Feb 2022 17:58:27 +0100 Jonas Maebe via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
>[...] > >> I wouldn't consider this to be working by design, but rather > >> because of implementation limitations. +1 pas2js complained. That's how I found out. Someone renamed a class, added an alias for compatibility, forgot to rename the implementation, and fpc did not complain. > > Why do you consider it a limitation ? > > > > Because the compiler currently has no way to distinguish the types > > when resolving the > > name "T" (as used in my example)? > > Indeed. > > > Then it is a strange coincidence that Delphi has it too :-) > > The simplest way to implement alias types is to just have them refer > to the original type... Actually pas2js did an even simpler approach here: Look up the identifier without resolving the original type ;) Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal