| /** |
| ## Types |
| |
| See [Types](basic-types.html) |
| */ |
| |
| /* |
| |
| Foo<Bar<X>, T, Object> // user type |
| (A, Object) -> Foo // function type |
| () -> Foo // function with no arguments |
| |
| */ |
| |
| type |
| : typeModifiers typeReference |
| ; |
| |
| // If you change this, consider updating TYPE_REF_FIRST in KotlinParsing |
| typeReference |
| : "(" typeReference ")" |
| : functionType |
| : userType |
| : nullableType |
| : "dynamic" |
| ; |
| |
| nullableType |
| : typeReference "?" |
| ; |
| |
| userType |
| : simpleUserType{"."} |
| ; |
| |
| simpleUserType |
| : SimpleName ("<" (projection? type | "*"){","} ">")? |
| ; |
| |
| projection |
| : varianceAnnotation |
| ; |
| |
| functionType |
| : (type ".")? "(" parameter{","}? ")" "->" type |
| ; |