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-2127Smart cast receiver to not null after a not null safe callKT-6840Make data flow information the same for assigned and assigneeKT-13426Fix exception when smartcast on both dispatch & extension receiver
Bound references related issues
KT-12995Do not skip generation of the left-hand side for intrinsic bound references and class literalsKT-13075Fix codegen for bound class referenceKT-13110Fix type mismatch error on class literal with integer receiver expressionKT-13172Report error on "this::class" in super constructor callKT-13271Fix incorrect unsupported error on synthetic extension call on LHS of ::KT-13367Inline bound callable reference if it's used only as a lambda
Coroutines related issues
KT-13156Do not execute last Unit-typed coroutine statement twiceKT-13246Fix VerifyError with coroutines on DalvikKT-13289Fix VerifyError with coroutines: Bad type on operand stackKT-13409Fix generic variable spilling with coroutinesKT-13531Fix ClassCastException when coercion to Unit interacts with generic await() and coroutinesProhibit
Continuation<*>as a last parameter of suspend functionsKT-13560Prohibit non-Unit suspend functions
Typealises related issues
KT-13200Fix incorrect number of required type arguments reported on typealiasKT-13181Fix unresolved reference for a type alias from a different moduleKT-13161Support java static methods calls with typealiasesKT-13835Do not lose nullability information while expanding type alias in projection positionKT-13422Prohibit usage of type alias to exception class as an object in 'throw' expressionKT-13735Fix NoSuchMethodError for generic typealias accessKT-13513Support SAM constructors for aliased java functional typesKT-13822Fix exception for start-projection of a type aliasKT-14071Prohibit using type alias as a qualifier for superKT-14282Report error on unused type alias with -language-version 1.0KT-14274Fix type alias resolution when it's used for supertype constructor call
JDK dependent built-in classes related issues
KT-13209Change first parameter's type of Map.getOrDefault to K instead of AnyKT-13069Do not emit invalid DefaultImpls delegation when interface extends MutableMap with JDK8
data classes and inheritance
KT-11306Allow data classes to implement equals/hashCode/toString from base classes
Various JVM code generation issues
KT-13182Fix compiler internal error at inlineKT-13757Prohibit referencing nested classes by name with $KT-12985Do not create range instances for 'for' loop in CharSequence.indicesKT-13931Optimize generated code for IntRange#contains
Various analysis & diagnostic issues
KT-435Use parameter names in error messages when calling a function-valued expressionKT-10001Fix false unnecessary non-null assertion on a pair elementKT-12811Treat function declaration as final if it is a member of a final classKT-13961Report REDECLARATION on private-in-file 'foo' vs public 'foo' in different file
下载地址
引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
多线程方面有什么独到之处么引用来自“wongloong”的评论
no~更多的是带来编写上的方便引用来自“pseudo”的评论
那还不如用scala呢引用来自“rxaa”的评论
kotlin和java100%兼容引用来自“pseudo”的评论
jvn系的语言有哪个不能相互调用的引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
多线程方面有什么独到之处么引用来自“wongloong”的评论
no~更多的是带来编写上的方便引用来自“pseudo”的评论
那还不如用scala呢引用来自“rxaa”的评论
kotlin和java100%兼容引用来自“pseudo”的评论
jvn系的语言有哪个不能相互调用的引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
多线程方面有什么独到之处么引用来自“wongloong”的评论
no~更多的是带来编写上的方便引用来自“pseudo”的评论
那还不如用scala呢引用来自“rxaa”的评论
kotlin和java100%兼容引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
多线程方面有什么独到之处么引用来自“wongloong”的评论
no~更多的是带来编写上的方便引用来自“pseudo”的评论
那还不如用scala呢引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
多线程方面有什么独到之处么引用来自“wongloong”的评论
no~更多的是带来编写上的方便引用来自“pseudo”的评论
看了下他的语法,这货怎么这么像scala引用来自“狸猫”的评论
明明是像swift引用来自“123oss”的评论
是swift像它,它比swift早多了。引用来自“pseudo”的评论
看了下他的语法,这货怎么这么像scala引用来自“狸猫”的评论
明明是像swift引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
多线程方面有什么独到之处么引用来自“wongloong”的评论
已经在用。很不错引用来自“pseudo”的评论
看了下他的语法,这货怎么这么像scala