Yep, this situation would confuse the compiler as it's possible to assign descendant class instance to a class. 1st solution: rename one of the constructor, don't need to use virtual/override 2nd solution: try using constref instead of const (I hope constref has the same semantics as var for classes, where the assigned object must be exactly the instance of expected class, descendants not allowed)
-- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Problem-with-virtual-constructors-tp4445729p4445832.html Sent from the Free Pascal - General mailing list archive at Nabble.com. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal