Remove KotlinSignature from tests, spec, delete tests with errors

This commit is contained in:
Alexander Udalov
2015-11-13 18:36:48 +03:00
parent 9cdeac7839
commit d472154ea7
153 changed files with 30 additions and 1876 deletions
+1 -31
View File
@@ -240,7 +240,6 @@ Goals:
- `org.jetbrains.annotations.NotNull` - value can not be null/passing null leads to an exception
- `org.jetbrains.annotations.ReadOnly` - only non-mutating methods can be used on this collection/iterable/iterator
- `org.jetbrains.annotations.Mutable` - mutating methods can be used on this collection/iterable/iterator
- `kotlin.jvm.KotlinSignature(str)` - `str` is a string representation of a more precise signature
See [appendix](#appendix) for more details
@@ -263,35 +262,6 @@ class Sub extends Super {
}
```
#### @KotlinSignature
``` java
package kotlin.jvm;
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD})
public @interface KotlinSignature {
String value();
}
```
Usage:
``` java
class C {
@KotlinSignature("fun foo(): MutableList<String?>")
List<String> foo() { ... }
}
```
Name resolution: `@KotlinSignature` can use short names from types, because full names are already specified in respective positions in
the Java signature.
- If there's a `@KotlinSignature` annotation, other annotations are ignored
- If erasure of the signature specified by `@KotlinSignature` differs from the actual erased signature,
a warning is reported and the `@KotlinSignature` annotation is ignored
- Otherwise, the signature from `@KotlinSignature` is used.
#### @Nullable, @NotNull, @ReadOnly, @Mutable
What can be annotated:
@@ -436,7 +406,7 @@ fun foo(p: List<T>!): R! // conflict on nullability, no conflict on mutability
```
```
fun foo(MutableList<T> p): R // super A, written in Kotlin or has @KotlinSignature
fun foo(MutableList<T> p): R // super A, written in Kotlin
@Nullable
R foo(List<T> p) // subclass B