an alias to the Type of the current type_scope, or the nearest ancestor type_scope, or an error if there is none


// A node for a K-Ary tree
KAryNode := (<Int> k, <Type> t) {
	return type {
		<t> value;
		<this_type> nullNode := this_type();
		Array<k, this_type> children = [nullNode]*k;


Since the this keyword is only valid inside member functions of a type, type_of(this) is not viable for some constructions, such as the above example.

copyright © Brent Lewis 2017