Kotlin 2.3 stabilized type aliases nested inside another declaration. A class can keep a name for Set<Stop> close to the method that uses it instead of placing that alias at package level. An alias is another name, not a new type.
The demo declares an alias inside RoutePlanner and uses it in a method. Nested aliases cannot capture type parameters from the enclosing class.
When to use
Use it to name a long type expression within the domain that owns it.