发布于 2016-10-21 00:57:05 | 132 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Kotlin 基于JVM的编程语言

Kotlin 是一个基于 JVM 的新的编程语言,由 JetBrains 开发。


Kotlin 1.1-M02 (Early Access Preview)发布了,这是 Kotlin 1.1 的第二个里程碑版本,也带来了大量更新。这个版本带来了让人期待已久的新语言特性,在 lambdas 表达式中的解构,同时还有许多基于 1.1-M1 的新特性改进。部分更新如下:

语言特性

  • 用于 lambdas 表达式的解构 (proposal)

    Current limitations:

    • Nested destructuring is not supported

    • Destructuring in named functions/constructors is not supported

    • Is not supported for JS target

编译器

Smart cast enhancements

  • KT-2127 Smart cast receiver to not null after a not null safe call

  • KT-6840 Make data flow information the same for assigned and assignee

  • KT-13426 Fix exception when smartcast on both dispatch & extension receiver

Bound references related issues

  • KT-12995 Do not skip generation of the left-hand side for intrinsic bound references and class literals

  • KT-13075 Fix codegen for bound class reference

  • KT-13110 Fix type mismatch error on class literal with integer receiver expression

  • KT-13172 Report error on "this::class" in super constructor call

  • KT-13271 Fix incorrect unsupported error on synthetic extension call on LHS of ::

  • KT-13367 Inline bound callable reference if it's used only as a lambda

Coroutines related issues

  • KT-13156 Do not execute last Unit-typed coroutine statement twice

  • KT-13246 Fix VerifyError with coroutines on Dalvik

  • KT-13289 Fix VerifyError with coroutines: Bad type on operand stack

  • KT-13409 Fix generic variable spilling with coroutines

  • KT-13531 Fix ClassCastException when coercion to Unit interacts with generic await() and coroutines

  • Prohibit Continuation<*> as a last parameter of suspend functions

  • KT-13560 Prohibit non-Unit suspend functions

Typealises related issues

  • KT-13200 Fix incorrect number of required type arguments reported on typealias

  • KT-13181 Fix unresolved reference for a type alias from a different module

  • KT-13161 Support java static methods calls with typealiases

  • KT-13835 Do not lose nullability information while expanding type alias in projection position

  • KT-13422 Prohibit usage of type alias to exception class as an object in 'throw' expression

  • KT-13735 Fix NoSuchMethodError for generic typealias access

  • KT-13513 Support SAM constructors for aliased java functional types

  • KT-13822 Fix exception for start-projection of a type alias

  • KT-14071 Prohibit using type alias as a qualifier for super

  • KT-14282 Report error on unused type alias with -language-version 1.0

  • KT-14274 Fix type alias resolution when it's used for supertype constructor call

JDK dependent built-in classes related issues

  • KT-13209 Change first parameter's type of Map.getOrDefault to K instead of Any

  • KT-13069 Do not emit invalid DefaultImpls delegation when interface extends MutableMap with JDK8

data classes and inheritance

  • KT-11306 Allow data classes to implement equals/hashCode/toString from base classes

Various JVM code generation issues

  • KT-13182 Fix compiler internal error at inline

  • KT-13757 Prohibit referencing nested classes by name with $

  • KT-12985 Do not create range instances for 'for' loop in CharSequence.indices

  • KT-13931 Optimize generated code for IntRange#contains

Various analysis & diagnostic issues

  • KT-435 Use parameter names in error messages when calling a function-valued expression

  • KT-10001 Fix false unnecessary non-null assertion on a pair element

  • KT-12811 Treat function declaration as final if it is a member of a final class

  • KT-13961 Report REDECLARATION on private-in-file 'foo' vs public 'foo' in different file

点此查看完整更新内容发行说明

下载地址



历史版本 :
Kotlin 1.2.21 发布,Bug 修复版本
Kotlin 1.2.20 发布:添加对 Gradle 构建缓存的支持
Kotlin/Native 0.5 支持在Swift, C和LLVM 5中使用 Kotlin
Kotlin 1.2 发布,实现平台间共享代码
Kotlin 1.1.60 发布,开始支持增量编译
Kotlin 1.2 Beta2 发布:显著提升编译器性能
Kotlin 1.2 Beta 版发布,基于 JVM 的编程语言
Kotlin 1.1.50 发布,基于 JVM 的编程语言
Kotlin 1.1.4 发布,改进对 Java 9 的支持
Kotlin 1.2 M2 发布,1.2 系列的早期访问版
Kotlin 1.2-M1 发布,1.2 系列的早期访问版
Kotlin 1.1.3 发布,初始支持 JDK 9
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务