From 7e6c63a4d5a4acf9a4f993e6dff6ee7912f26c1e Mon Sep 17 00:00:00 2001 From: bd-912 Date: Thu, 25 Apr 2024 23:34:56 -0600 Subject: Fix message send to handle class variables --- boil/library/BoilVisitor.java | 4 ++++ boil/library/TypeFactory.java | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'boil/library') diff --git a/boil/library/BoilVisitor.java b/boil/library/BoilVisitor.java index f977491..0c0f76a 100644 --- a/boil/library/BoilVisitor.java +++ b/boil/library/BoilVisitor.java @@ -938,6 +938,10 @@ public class BoilVisitor extends GJDepthFirst { t = this.symt.getType(rhs); if (t == null) t = this.symt.getTypeAttr(rhs); + rhs = n.f0.accept(this, argu); + this.addVapor(String.format(" %s = %s\n", + this.tf.alias(t.getName()), + rhs)); break; case 4: // we'll do everything here and exit the function diff --git a/boil/library/TypeFactory.java b/boil/library/TypeFactory.java index 47b97b2..ddf54c8 100644 --- a/boil/library/TypeFactory.java +++ b/boil/library/TypeFactory.java @@ -20,9 +20,11 @@ public class TypeFactory { */ String alias; if ((alias = this.map.get(t)) == null) { - MinimalLogger.info(String.format("Creating new alias for %s...", - t)); alias = String.format("t.%d", this.type_num++); + MinimalLogger.info(String.format("Created alias %s for %s...", + alias, + t)); + this.map.put(t, alias); } -- cgit v1.2.3