I got errors "Cannot resolve symbol ReadOnly" and "Cannot resolve symbole Mutable" in compiling with Kotlin 1.1.0. Is @ReadOnly and @Mutable not available with Kotlin 1.1.0? The following is a sample code.
SampleList.java Kotlin 1.0.7
import org.jetbrains.annotations.Mutable;
import org.jetbrains.annotations.ReadOnly;
import java.util.ArrayList;
import java.util.List;
public class SampleList {
@ReadOnly // Can resolve symbol 'ReadOnly'
public static List<Integer> getReadOnlyList() {
return new ArrayList<>();
}
@Mutable // Can resolve symbol 'Mutable'
public static List<Integer> getMutableList() {
return new ArrayList<>();
}
}
SampleList.java Kotlin 1.1.0
import org.jetbrains.annotations.Mutable;
import org.jetbrains.annotations.ReadOnly;
import java.util.ArrayList;
import java.util.List;
public class SampleList {
@ReadOnly // Cannot resolve symbol 'ReadOnly'
public static List<Integer> getReadOnlyList() {
return new ArrayList<>();
}
@Mutable // Cannot resolve symbol 'Mutable'
public static List<Integer> getMutableList() {
return new ArrayList<>();
}
}
Thanks in advance.