-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BlockStructureBraces assertion failed (#461)
* BlockStructureBraces assertion failed ### What's done: Fixed bug and added tests
- Loading branch information
Showing
8 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,7 @@ class C{ | |
private val id = 11 | ||
} | ||
} | ||
|
||
class D { | ||
val x = 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ class C{ | |
companion object{ | ||
private val id = 11} | ||
} | ||
|
||
class D {val x = 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ fun readFile(foo: Foo) { | |
var bar: Bar | ||
} | ||
|
||
class D { | ||
val x = 0 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ package test.smoke.src.main.kotlin | |
|
||
fun readFile(foo: Foo) { | ||
var bar: Bar | ||
} | ||
} | ||
|
||
class D {val x = 0} |
23 changes: 23 additions & 0 deletions
23
diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example3Expected.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.cqfn.diktat | ||
|
||
/** | ||
* @property name | ||
*/ | ||
class HttpClient(var name: String) { | ||
var url: String = "" | ||
var port: String = "" | ||
var timeout = 0 | ||
|
||
fun doRequest() {} | ||
} | ||
|
||
fun mains() { | ||
val httpClient = HttpClient("myConnection") | ||
.apply { | ||
url = "http://pushkin.com" | ||
port = "8080" | ||
timeout = 100 | ||
} | ||
.doRequest() | ||
} | ||
|
19 changes: 19 additions & 0 deletions
19
diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example3Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.smoke.src.main.kotlin | ||
|
||
class HttpClient(var name: String) { | ||
var url: String = "" | ||
var port: String = "" | ||
var timeout = 0 | ||
|
||
fun doRequest() {} | ||
} | ||
|
||
fun mains() { | ||
val httpClient = HttpClient("myConnection") | ||
.apply { | ||
url = "http://pushkin.com" | ||
port = "8080" | ||
timeout = 100 | ||
} | ||
.doRequest() | ||
} |
f3da291
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: