summaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/typechecker/TypeChecker.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/typechecker/TypeChecker.java b/src/main/java/org/zwobble/hobgoblin/compiler/typechecker/TypeChecker.java
index f1b5067..1b10de2 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/typechecker/TypeChecker.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/typechecker/TypeChecker.java
@@ -2,7 +2,6 @@ package org.zwobble.hobgoblin.compiler.typechecker;
import org.zwobble.hobgoblin.compiler.ast.typed.*;
import org.zwobble.hobgoblin.compiler.ast.untyped.*;
-import org.zwobble.hobgoblin.compiler.sources.NullSource;
import org.zwobble.hobgoblin.compiler.sources.Source;
import org.zwobble.hobgoblin.compiler.types.*;
@@ -310,12 +309,10 @@ public class TypeChecker {
.findFirst();
if (variantTypeField.isEmpty()) {
- // TODO: set source appropriately.
- throw new SubtypeIsMissingFieldError(sumType, variantType, sumTypeField.name(), NullSource.INSTANCE);
+ throw new SubtypeIsMissingFieldError(sumType, variantType, sumTypeField.name(), sumTypeField.source());
}
- // TODO: set source appropriately.
- checkIsSubtype(variantTypeField.get().type(), sumTypeField.type(), NullSource.INSTANCE);
+ checkIsSubtype(variantTypeField.get().type(), sumTypeField.type(), variantTypeField.get().source());
}
}