Skip to content
  • Sven/Sarah Barth's avatar
    Add a new warning message that is generated if an instance of an abstract... · a7a94406
    Sven/Sarah Barth authored
    Add a new warning message that is generated if an instance of an abstract class is created. This message is disabled by default, but can be switched on by using {$warn 4122 on} or {$warn 4122 error}.
    
    Please note that this warning won't be triggered if an instance of that class is created using a class variable of that class type as the compiler can not know the type contained in the variable at compile time (see also the added test).
    
    + msg/errore.msg: added disabled message which informs about the instantiation of an abstract class
    * pexpr.pas, do_member_read: generate the message if we have a constructor call for an abstract class using a loadvmtaddrnode (thus the type name is used and not a class variable)
    
    * msg{idx,txt}.inc: updated
    
    + added test
    
    git-svn-id: trunk@28127 -
    a7a94406