summaryrefslogtreecommitdiff
path: root/src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java
diff options
context:
space:
mode:
authorElias Haugsbakk <[email protected]>2026-09-20 23:25:08 +0200
committerElias Haugsbakk <[email protected]>2026-09-20 23:25:08 +0200
commit10e0580ca3e920a5c7c126abdd70683c6fe2188f (patch)
tree26f176023df595dd0d10170380db66d6c334dd91 /src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java
parentb8ccfae5f782aa09343b885225dca2b1d36052aa (diff)
refactor Type to be a record class
- now with method to check type compatability
Diffstat (limited to 'src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java')
-rw-r--r--src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java b/src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java
index 8ade66e..f8a5756 100644
--- a/src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java
+++ b/src/main/java/no/eliashaugsbakk/kompilator/IRGeneration/IRGenerator.java
@@ -69,7 +69,7 @@ public class IRGenerator {
} else {
throw new IRGenerationException("Unknown function: " + identifierDecl.initializer);
}
- ir.add(new Alloc(identifierDecl.identifier, identifierDecl.type.type, identifierDecl.mutable,
+ ir.add(new Alloc(identifierDecl.identifier, identifierDecl.type.name(), identifierDecl.mutable,
value));
}