Type aliases

suggest change

Introduction

With type aliases, we can give an alias to another type. They are useful for naming function types such as (String) -> Boolean, or generic types such as Pair<Person, Person>.

Type aliases support generics. An alias can replace a generic type, and an alias can itself be generic.

Syntax

Remarks

Type aliases are a compiler feature. Nothing is added to the generated JVM code. Every alias is replaced by the real type.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents