Java to Kotlin converter: better comments preserving, never lose any comment

#KT-4489 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-06-20 14:30:37 +04:00
parent ef62600d5e
commit 116c27117f
20 changed files with 157 additions and 111 deletions
@@ -0,0 +1,20 @@
//file
package foo;
class A {
void/* nothing to return */ foo(/* no parameters at all */) {
// let declare a variable
// with 2 comments before
int/*int*/ a /* it's a */ = 2 /* it's 2 */ + 1 /* it's 1 */; // variable a declared
} // end of foo
int/* we return int*/ foo(int/*int*/ p/* parameter p */) { /* body is empty */ }
private/*it's private*/ int field = 0;
public /*it's public*/ char foo() { }
protected/*it's protected*/ void foo() { }
public/*it's public*/ static/*and static*/ final/*and final*/ int C = 1;
}