diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-05-06 23:43:58 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-05-06 23:43:58 +0100 |
| commit | 73afea9ca774a63e8149ca02fe48860e2b06e365 (patch) | |
| tree | fe99dccacfab2e9e2ebad26e4ac9cef502b1940b /src/test/java | |
| parent | 2e958ec140e0ac146c8462eba6483320dbff8dd8 (diff) | |
Add ConstructedNativeType
Diffstat (limited to 'src/test/java')
2 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerStructDefinitionTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerStructDefinitionTests.java index 2409b65..6cd6732 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerStructDefinitionTests.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerStructDefinitionTests.java @@ -11,7 +11,7 @@ import org.zwobble.hobgoblin.compiler.ast.untyped.UntypedStructDefinitionNode; import org.zwobble.hobgoblin.compiler.ast.untyped.UntypedStructFieldDefinitionNode; import org.zwobble.hobgoblin.compiler.sources.NullSource; import org.zwobble.hobgoblin.compiler.types.NamespaceName; -import org.zwobble.hobgoblin.compiler.types.NativeType; +import org.zwobble.hobgoblin.compiler.types.SimpleNativeType; import org.zwobble.hobgoblin.compiler.types.StructType; import org.zwobble.hobgoblin.compiler.types.TypeLevelValueType; @@ -45,8 +45,8 @@ public class TypeCheckerStructDefinitionTests { @Test public void fieldsAreTypeChecked() { - var int32Type = new NativeType("Int32"); - var int64Type = new NativeType("Int64"); + var int32Type = new SimpleNativeType("Int32"); + var int64Type = new SimpleNativeType("Int64"); var untyped = new UntypedStructDefinitionNode( "X", List.of( @@ -92,7 +92,7 @@ public class TypeCheckerStructDefinitionTests { @Test public void structCanUseTypeDefinedLater() { - var int32Type = new NativeType("Int32"); + var int32Type = new SimpleNativeType("Int32"); var namespaceName = NamespaceName.of("a", "b"); var untyped = new UntypedNamespaceNode( namespaceName, diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerTypeLevelReferenceTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerTypeLevelReferenceTests.java index b2dcc62..f0d3a81 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerTypeLevelReferenceTests.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/typechecker/TypeCheckerTypeLevelReferenceTests.java @@ -3,7 +3,7 @@ package org.zwobble.hobgoblin.compiler.typechecker; import org.junit.jupiter.api.Test; import org.zwobble.hobgoblin.compiler.ast.typed.TypedTypeLevelReferenceNode; import org.zwobble.hobgoblin.compiler.ast.untyped.UntypedArb; -import org.zwobble.hobgoblin.compiler.types.NativeType; +import org.zwobble.hobgoblin.compiler.types.SimpleNativeType; import org.zwobble.hobgoblin.compiler.types.TypeLevelValueType; import org.zwobble.hobgoblin.compiler.types.TypeSet; @@ -44,7 +44,7 @@ public class TypeCheckerTypeLevelReferenceTests { var untyped = UntypedArb.typeLevelReference("X"); var context = TypeCheckerContextArb.namespaceContext(); context.declare("X"); - var nativeType = new NativeType("Int"); + var nativeType = new SimpleNativeType("Int"); context.define("X", nativeType); var error = assertThrows( @@ -61,7 +61,7 @@ public class TypeCheckerTypeLevelReferenceTests { var untyped = UntypedArb.typeLevelReference("X"); var context = TypeCheckerContextArb.namespaceContext(); context.declare("X"); - var nativeType = new NativeType("Int"); + var nativeType = new SimpleNativeType("Int"); context.define("X", new TypeLevelValueType(nativeType)); var typed = TypeChecker.typeCheckTypeLevelExpression(untyped, context); |
