Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Dec 22, 2024
1 parent 6afda43 commit 21d70b8
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import com.fasterxml.jackson.databind.JsonSerializer
import com.fasterxml.jackson.databind.SerializerProvider
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import de.fraunhofer.aisec.cpg.*
import de.fraunhofer.aisec.cpg.graph.Name
import de.fraunhofer.aisec.cpg.graph.Node
import de.fraunhofer.aisec.cpg.graph.declarations.FunctionDeclaration
import de.fraunhofer.aisec.cpg.graph.edges.ast.TemplateArguments
Expand All @@ -42,7 +43,6 @@ import de.fraunhofer.aisec.cpg.passes.SymbolResolver
import java.io.File
import kotlin.reflect.KClass
import kotlin.reflect.full.primaryConstructor
import org.apache.commons.lang3.builder.ToStringBuilder

/**
* [CastResult] is the result of the function [Language.tryCast] and describes whether a cast of one
Expand Down Expand Up @@ -143,14 +143,9 @@ abstract class Language<T : LanguageFrontend<*, *>> : Node() {
return result
}

override fun toString(): String {
val builder = ToStringBuilder(this, TO_STRING_STYLE)

if (name.isNotEmpty()) {
builder.append("name", name)
}

return builder.toString()
init {
this.language = this
this::class.simpleName?.let { this.name = Name(it) }
}

private fun arithmeticOpTypePropagation(lhs: Type, rhs: Type): Type {
Expand Down Expand Up @@ -365,10 +360,6 @@ abstract class Language<T : LanguageFrontend<*, *>> : Node() {
Pair(list.toSet(), CallResolutionResult.SuccessKind.SUCCESSFUL)
}
}

override var language: Language<*>
get() = this
set(_) {}
}

/**
Expand Down

0 comments on commit 21d70b8

Please sign in to comment.