https://kotlinlang.org logo
d

denis.zharkov

08/11/2021, 3:27 PM
There are updates of the proposal based on your feedback! The main change is that we moved from confusing 
T!!
 syntax to a limited version of intersection types – 
T & Any
. It’s likely that at some point we’ll have full support for intersection types and then it would be just a special case that doesn’t deserve special syntax because it seems that the only real-world use-case we have by now is overrides of annotated Java.
👍 12
👍🏼 1
y

Youssef Shoaib [MOD]

08/11/2021, 6:13 PM
Oh wow this was honestly quite unexpected but very welcomed. Is there a possibility maybe just maybe please maybe to put a (very rudimentary and rough) version of intersection types behind an experimental flag? Because IIRC intersection types are already in the compiler and so having a rough user-facing version of them behind a flag shouldn't be too difficult.
👆 6
👆🏼 1
d

denis.zharkov

08/12/2021, 7:45 AM
Unfortunately, we don’t have any plans on intersection types for now. By the way, if you have some real-world use-cases for the feature, please file them to https://youtrack.jetbrains.com/