KT-4418 Converter from java should honor "@Nullable" annotations

#KT-4418 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-06-04 16:00:05 +04:00
parent 118b23061b
commit f96721fa7e
10 changed files with 117 additions and 56 deletions
@@ -0,0 +1,31 @@
//file
// !specifyLocalVariableTypeByDefault: true
package test;
import org.jetbrains.annotations.Nullable;
public class Test {
@Nullable String myStr = "String2";
public Test(@Nullable String str) {
myStr = str;
}
public void sout(@Nullable String str) {
System.out.println(str);
}
@Nullable
public String dummy(@Nullable String str) {
return str;
}
public void test() {
sout("String");
@Nullable String test = "String2";
sout(test);
sout(dummy(test));
new Test(test);
}
}