[nem-en] How to get the list of subtypes for the some TyVar?

vc vc at rsdn.ru
Wed Aug 23 13:38:34 CEST 2006


   > There is no (very) fast way to do this, but you could use
   > TypesManager's infos : list [TYpeBuilder]
   > 
   > this will give you all types present in current compilation - they you
   > can use on each of them SuperType method
   
   The 'infos' contained imported (from external assemblies) types?
   
   PS
   
   I implementing completion in 'is' pattern. For example:
   class A { }
   class B : A { }
   class C : A { }
   class D : C { }
   
   module Program
   {
     Main() : void
     {
   		def a : A = D();
   		
   		match (a)
   		{
   			| x is ><
   		}
     }
   }
   
   Where >< is completion position.
   
   I need to give out the list of types inherited from 'A', just as and the
list of interfaces.
   
   In principle, it is possible to give out simply the list of all 'open'
types and interfaces.




More information about the devel-en mailing list