Skip to content

Commit 0447e7f

Browse files
committed
reinstate defined type reference heap types as values
1 parent eb6babb commit 0447e7f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

ast/src/commonMain/kotlin/io/github/charlietap/chasm/ast/type/HeapType.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ sealed interface ConcreteHeapType : HeapType {
4343
@JvmInline
4444
value class RecursiveTypeIndex(val index: Int) : ConcreteHeapType
4545

46-
data class Defined(val definedType: DefinedType) : ConcreteHeapType
46+
@JvmInline
47+
value class Defined(val definedType: DefinedType) : ConcreteHeapType
4748
}

type-system/src/commonMain/kotlin/io/github/charlietap/chasm/type/rolling/substitution/ConcreteHeapTypeSubstitutor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import io.github.charlietap.chasm.ast.type.DefinedType
55

66
typealias ConcreteHeapTypeSubstitutor = (ConcreteHeapType) -> ConcreteHeapType
77

8-
inline fun TypeIndexToRecursiveTypeIndexSubsitutor(
8+
fun TypeIndexToRecursiveTypeIndexSubsitutor(
99
lowerBound: Int,
1010
upperBound: Int,
1111
): ConcreteHeapTypeSubstitutor = { concreteHeapType ->
@@ -22,7 +22,7 @@ inline fun TypeIndexToRecursiveTypeIndexSubsitutor(
2222
}
2323
}
2424

25-
inline fun TypeIndexToDefinedTypeSubstitutor(
25+
fun TypeIndexToDefinedTypeSubstitutor(
2626
types: List<DefinedType>,
2727
): ConcreteHeapTypeSubstitutor = { concreteHeapType ->
2828
when (concreteHeapType) {

0 commit comments

Comments
 (0)