Kotlin 1.7.0 beta alters builder type inference
Kotlin 1.7.0, a planned new version of JetBrains’ cross-platform, multipurpose programming language, has reached a beta release stage, featuring changes to the builder type inference and a new memory manager.Builder inference, a special kind of type inference useful when calling generic builder functions, brings the platform closer to builder inference stabilization. With the 1.7.0 beta, builder inference is automatically activated if a regular type inference cannot get enough information about a type without specifying the -Xenable-builder-inference compiler option. Developers now can write their own builders that use builder type inference without applying additional annotations or options. Builder type inference helps the compiler infer the type arguments via type information about other calls inside a lambda argument.To read this article in full, please click here
Kotlin 1.7.0, a planned new version of JetBrains’ cross-platform, multipurpose programming language, has reached a beta release stage, featuring changes to the builder type inference and a new memory manager.
Builder inference, a special kind of type inference useful when calling generic builder functions, brings the platform closer to builder inference stabilization. With the 1.7.0 beta, builder inference is automatically activated if a regular type inference cannot get enough information about a type without specifying the -Xenable-builder-inference
compiler option. Developers now can write their own builders that use builder type inference without applying additional annotations or options. Builder type inference helps the compiler infer the type arguments via type information about other calls inside a lambda argument.