From 3a36e493c8cfd9f6fe85ff6d38e06194b2dac80e Mon Sep 17 00:00:00 2001 From: Geoffrey Challen Date: Tue, 11 Oct 2022 09:08:35 -0500 Subject: [PATCH] Fix fauxStatic detection. --- build.gradle.kts | 4 ++-- src/main/kotlin/Solution.kt | 2 +- src/main/resources/edu.illinois.cs.cs125.jenisol.core.version | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index cd7675d..cb30f56 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ import java.util.Properties import org.jetbrains.kotlin.gradle.tasks.KotlinCompile group = "com.github.cs125-illinois" -version = "2022.10.0" +version = "2022.10.1" plugins { kotlin("jvm") version "1.7.20" @@ -28,7 +28,7 @@ dependencies { implementation("io.github.classgraph:classgraph:4.8.149") implementation("io.github.kostaskougios:cloning:1.10.3") - testImplementation("io.kotest:kotest-runner-junit5:5.4.2") + testImplementation("io.kotest:kotest-runner-junit5:5.5.1") testImplementation("org.slf4j:slf4j-simple:2.0.3") } tasks.withType { diff --git a/src/main/kotlin/Solution.kt b/src/main/kotlin/Solution.kt index 964164f..16c6fe8 100644 --- a/src/main/kotlin/Solution.kt +++ b/src/main/kotlin/Solution.kt @@ -103,7 +103,7 @@ class Solution(val solution: Class<*>) { (receiverGenerators.size == 1 && receiverGenerators.first().parameters.isEmpty()) ) - val fauxStatic = solution.superclass == Any::class.java && + val fauxStatic = !skipReceiver && solution.superclass == Any::class.java && solution.declaredFields.all { it.isJenisol() || it.isStatic() } && solution.declaredMethods.all { it.isJenisol() || diff --git a/src/main/resources/edu.illinois.cs.cs125.jenisol.core.version b/src/main/resources/edu.illinois.cs.cs125.jenisol.core.version index cbe5ac6..2e60882 100644 --- a/src/main/resources/edu.illinois.cs.cs125.jenisol.core.version +++ b/src/main/resources/edu.illinois.cs.cs125.jenisol.core.version @@ -1 +1 @@ -version=2022.10.0 \ No newline at end of file +version=2022.10.1 \ No newline at end of file