diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-18 18:40:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-18 18:40:58 -0700 |
commit | 6152ef13a865eb1795fd5547f4d307a6f5690558 (patch) | |
tree | 6fb203d22a8875366a5f836a3279f00d5011a895 /010vm.cc | |
parent | 56109c6d03a4442b6dc1e1968710a0ec7f159963 (diff) | |
download | mu-6152ef13a865eb1795fd5547f4d307a6f5690558.tar.gz |
1399 - better 'unknown type' warnings
Implement warnings for types without definitions without constraining where type definitions must appear. We also eliminate the anti-pattern where a change in layer 10 had its test in layer 11 (commit 1383).
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/010vm.cc b/010vm.cc index 3399a539..a5069c45 100644 --- a/010vm.cc +++ b/010vm.cc @@ -184,8 +184,10 @@ reagent::reagent(string s) :value(0), initialized(false) { name = properties.at(0).first; for (long long int i = 0; i < SIZE(properties.at(0).second); ++i) { string type = properties.at(0).second.at(i); - if (Type_number.find(type) == Type_number.end()) - raise << "unknown type: " << type << '\n'; + if (Type_number.find(type) == Type_number.end()) { +//? cerr << type << " is " << Next_type_number << '\n'; //? 1 + Type_number[type] = Next_type_number++; + } types.push_back(Type_number[type]); } if (name == "_" && types.empty()) { |