I think I have found a bug in the Kotlin compiler...
# announcements
r
I think I have found a bug in the Kotlin compiler when handling Java 8 type annotations. The following Kotlin fun (within an interface):
Copy code
kotlin
@DefaultOption
fun simpleString(): Optional<@DefaultString("default-string") String>
Turns into this bytecode (as shown in Intellij):
Copy code
kotlin
  // access flags 0x401
  // signature ()Ljava/util/Optional<Ljava/lang/String;>;
  // declaration: java.util.Optional<java.lang.String> simpleString()
  public abstract simpleString()Ljava/util/Optional;
  @Lsdk/config/annotation/DefaultOption;()
  @Lorg/jetbrains/annotations/NotNull;() // invisible
    LOCALVARIABLE this Lparser/ChoiceConfig$StringOrSettings; L0 L1 0