Skip to content

Commit

Permalink
Enable IR validation (#57)
Browse files Browse the repository at this point in the history
Also fix an IR bug discovered by this validation.

Closes: #32

Co-authored-by: Jesse Wilson <[email protected]>
  • Loading branch information
swankjesse and squarejesse authored Oct 30, 2024
1 parent e50a772 commit e0674da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ fun compile(
sources = sourceFiles
compilerPluginRegistrars = listOf(plugin)
inheritClassPath = true
kotlincArguments += "-Xverify-ir=error"
kotlincArguments += "-Xverify-ir-visibility"
}.compile()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.jetbrains.kotlin.ir.declarations.IrValueParameter
import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI
import org.jetbrains.kotlin.ir.types.classFqName
import org.jetbrains.kotlin.ir.types.starProjectedType
import org.jetbrains.kotlin.ir.util.patchDeclarationParents
import org.jetbrains.kotlin.name.Name

/**
Expand Down Expand Up @@ -135,6 +136,7 @@ internal class FunctionSpecializer(
}
}

result.patchDeclarationParents()
return result
}
}

0 comments on commit e0674da

Please sign in to comment.