From 41e8db9a2477dd2b661d37f33d142a0465c63f52 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 11 Dec 2022 19:10:29 +0200 Subject: [PATCH] VariableDeclaration - Prevent updating of the fields `varName`, `length` and `varType` after construction of the object --- source/tlang/compiler/codegen/instruction.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tlang/compiler/codegen/instruction.d b/source/tlang/compiler/codegen/instruction.d index 0ceb9f3..26f184c 100644 --- a/source/tlang/compiler/codegen/instruction.d +++ b/source/tlang/compiler/codegen/instruction.d @@ -69,13 +69,13 @@ public class VariableAssignmentInstr : Instruction public final class VariableDeclaration : StorageDeclaration { /* Name of variable being declared */ - public string varName; + public const string varName; /* Length */ - public byte length; + public const byte length; /* Type of the variable being declared */ - public string varType; + public const string varType; //TODO: This must take in type information this(string varName, byte len, string varType)