diff --git a/source/compiler.c b/source/compiler.c index 56d1865..4f19ad0 100644 --- a/source/compiler.c +++ b/source/compiler.c @@ -19,10 +19,6 @@ void initCompiler(Compiler* compiler) { //separated out, so it can be recursive static int writeLiteralTypeToCacheOpt(LiteralArray* literalCache, Literal literal, bool skipDuplicationOptimisation) { - printf(WARN); - printLiteral(literal); - printf(RESET); - //if it's a compound type, recurse and store the results if (AS_TYPE(literal).typeOf == LITERAL_ARRAY || AS_TYPE(literal).typeOf == LITERAL_DICTIONARY) { //I don't like storing types in an array, but it's the easiest and most straight forward method @@ -51,9 +47,9 @@ static int writeLiteralTypeToCacheOpt(LiteralArray* literalCache, Literal litera int index = findLiteralIndex(literalCache, literal); if (index < 0) { index = pushLiteralArray(literalCache, literal); - freeLiteral(literal); } + freeLiteral(literal); return index; } else { diff --git a/test/sample_code.toy b/test/sample_code.toy index c5b6211..1f18509 100644 --- a/test/sample_code.toy +++ b/test/sample_code.toy @@ -1,15 +1,7 @@ - var complex: type = type [string, [int]]; -var dict: complex = [ - "first array": [1, 2, 3], - "second array": [4, 5, 6], - "third array": [7, 8, 9] -]; - - var deep: type = type [[[ int ]]];