KeyType

The KeyType pseudo type is valid only in the context of methods defined in the Dictionary class and subclasses. KeyType provides an indirection used by the compiler that expands to a list of keys defined in the receiver type.

The compiler expands the KeyType formal parameter, substituting an ordered list of parameters of the correct type for each of the keys in the dictionary. (See also the ParamListType pseudo type, which maps to a variable list of parameters of any type and is in effect a generalization of KeyType.) For example, the following is the signature of the Dictionary::getAtKey method.

getAtKey(keys: KeyType): MemberType is dictGetAtKey in jomsupp;

The getAtKey method is inherited by any user-defined subclasses of the ExtKeyDictionary and MemberKeyDictionary classes. When the getAtKey method is used in a method, the compiler looks up the type of the receiver, which must be a dictionary to determine the dictionary keys. The compiler expands the KeyType formal parameter and substitutes an ordered list of parameters of the correct type for each of the keys in the dictionary.