Java to Kotlin converter: do not generate redundant parenthesis for empty constructor parameters

This commit is contained in:
Valentin Kipyatkov
2014-06-25 18:21:15 +04:00
parent 947bf3c0ed
commit 5a5e553367
207 changed files with 266 additions and 268 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import java.util.ArrayList
// we need ArrayList
// let's declare a class:
class A /* just a sample name*/() : Runnable /* let's implement Runnable */ {
class A /* just a sample name*/ : Runnable /* let's implement Runnable */ {
fun foo/* again a sample name */(p: Int /* parameter p */, c: Char /* parameter c */) {
// let's print something:
System.out.println("1") // print 1
+1 -1
View File
@@ -1,6 +1,6 @@
package foo
class A() {
class A {
fun /* nothing to return */ foo(/* no parameters at all */) {
// let declare a variable
// with 2 comments before
@@ -1,3 +1,3 @@
class A() {
class A {
private val isOpen = true // ideally should be atomic boolean
}