Skip to content

Commit

Permalink
Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilStepanov committed Oct 14, 2019
1 parent 2dffc9f commit 3af697e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ChangeOperatorsToFunInvocations : Transformation() {

override fun transform() {
var oldText = file.text
var newText = ""
var newText: String
while (true) {
transformImpl()
newText = file.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ fun String.isSubstringOf(other: String): Boolean {

fun removeMainFromFiles(dir: String) {
val files = mutableListOf<File>()
Files.find(Paths.get(dir), Int.MAX_VALUE, BiPredicate { t, u -> u.isRegularFile })
Files.find(Paths.get(dir), Int.MAX_VALUE, BiPredicate { _, u -> u.isRegularFile })
.forEach { files.add(it.toFile()) }
files.forEach {
if (!it.name.contains("mutated"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("IMPLICIT_CAST_TO_ANY")

package com.stepanov.bbf.util

import ru.spbstu.kotlin.generate.combinators.KCheck
Expand Down Expand Up @@ -53,6 +55,7 @@ fun generateDefValuesAsString(type: String): String {
}


@Suppress("UNCHECKED_CAST")
private fun <T> generateDefValuesForDefaultTypes(type: String): T =
when (type) {
"Int" -> Random().nextInt()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import java.util.*
object BugComparator {

fun compare(path1: String, path2: String, compiler: CommonCompiler): Pair<LinkedList<DiffMatchPatch.Diff>?, Pair<Double, Double>> {
val p1 = "/home/stepanov/Kotlin/backend-bugfinder/tmp/results/jvmCompilerErrors/test/wnorl.kt"
val p2 = "/home/stepanov/Kotlin/backend-bugfinder/tmp/results/jvmCompilerErrors/test/whenInUnreachbleFun.kt"
val text1 = compiler.getErrorMessage(path1)
val text2 = compiler.getErrorMessage(path2)
val patch = DiffMatchPatch()
Expand Down

0 comments on commit 3af697e

Please sign in to comment.