generated from moderneinc/rewrite-recipe-starter
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Named function type parameters support (#282)
* Function type parameters support Up until now the function type were in the LST represented using lambdas. This approach falls down, because with function type parameters the type is mandatory and the name is optional, whereas for lambdas it is the other way around. Also, a lambda as a body, whereas a function type has a return type. The `K.FunctionType` now declares an explicit `K.FunctionType.Parameters parameters` object, a `Space arrow` for the arrow prefix, and a `TypedTree returnType` for the return type. * Use correct location in visitor * Continued work * Polish * Add `@JsonAlias` annotation for backwards compatibility * Use `TypedTree` for `K.FunctionType#returnType` * Remove some legacy uses of `K.FunctionType` * Polish * New `K.FunctionType.Parameter` * More progress * Remove `KCoordinateBuilder` * Complete `KotlinVisitor` * Support nullable function types Fixes: #275 * Add `colon` space * Add one more test * `K.FunctionType#parameters` is now declared non-null * Implement basic formatting for function type parameters * Fix printing of opening nullable parenthesis
- Loading branch information
1 parent
cf9c2dc
commit 456e275
Showing
12 changed files
with
349 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.