about summary refs log tree commit diff stats
path: root/015literal_noninteger.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-21 20:30:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-21 20:40:06 -0800
commitc4e143d6ea0635cdb164cec1c62afd7461e605ad (patch)
tree06fbb672ce95f1d5152c113cdb40685148b57d0c /015literal_noninteger.cc
parentf22250a174d5ad5abf8bf99ad140ced52563aee2 (diff)
downloadmu-c4e143d6ea0635cdb164cec1c62afd7461e605ad.tar.gz
2681 - drop reagent types from reagent properties
All my attempts at staging this change failed with this humongous commit
that took all day and involved debugging three monstrous bugs. Two of
the bugs had to do with forgetting to check the type name in the
implementation of shape-shifting recipes. Bug #2 in particular would
cause core tests in layer 59 to fail -- only when I loaded up edit/! It
got me to just hack directly on mu.cc until I figured out the cause
(snapshot saved in mu.cc.modified). The problem turned out to be that I
accidentally saved a type ingredient in the Type table during
specialization. Now I know that that can be very bad.

I've checked the traces for any stray type numbers (rather than names).

I also found what might be a bug from last November (labeled TODO), but
we'll verify after this commit.
Diffstat (limited to '015literal_noninteger.cc')
-rw-r--r--015literal_noninteger.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/015literal_noninteger.cc b/015literal_noninteger.cc
index 4cea4104..fa30290d 100644
--- a/015literal_noninteger.cc
+++ b/015literal_noninteger.cc
@@ -5,13 +5,12 @@
 recipe main [
   1:number <- copy 3.14159
 ]
-+parse:   ingredient: {"3.14159": "literal-number"}
++parse:   ingredient: 3.14159: "literal-fractional-number"
 
 :(after "Parsing reagent(string s)")
 if (is_noninteger(s)) {
   name = s;
-  type = new type_tree("literal-number", 0);
-  properties.push_back(pair<string, string_tree*>(name, new string_tree("literal-number")));
+  type = new type_tree("literal-fractional-number", 0);
   set_value(to_double(s));
   return;
 }