aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/shedlang/compiler/types/TypeSubstitution.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/shedlang/compiler/types/TypeSubstitution.java b/src/main/java/org/shedlang/compiler/types/TypeSubstitution.java
index bd679292..e08b859e 100644
--- a/src/main/java/org/shedlang/compiler/types/TypeSubstitution.java
+++ b/src/main/java/org/shedlang/compiler/types/TypeSubstitution.java
@@ -33,9 +33,11 @@ public class TypeSubstitution {
case TopType topType -> type;
- case TupleType tupleType -> {
- throw new UnsupportedOperationException("TODO");
- }
+ case TupleType tupleType -> new TupleType(
+ tupleType.elements().stream()
+ .map(element -> substitute(element, map))
+ .toList()
+ );
case TypeLevelValueType typeLevelValueType -> {
throw new UnsupportedOperationException("TODO");