aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/errors.stanza
diff options
context:
space:
mode:
authorazidar2015-08-04 16:41:41 -0700
committerazidar2015-08-04 16:41:41 -0700
commit0ec003236680c50ff3f4a90da007fd9e39ba2e4f (patch)
tree5cbdb0f27884c5732145e7c4fa2478fd533b7cf9 /src/main/stanza/errors.stanza
parentede7df1a99a7b5bf44ccfca4f7beb650e65f8b8b (diff)
Added check for reading from outputs with flips
Diffstat (limited to 'src/main/stanza/errors.stanza')
-rw-r--r--src/main/stanza/errors.stanza6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza
index edb9928e..bfeb980b 100644
--- a/src/main/stanza/errors.stanza
+++ b/src/main/stanza/errors.stanza
@@ -725,6 +725,12 @@ public defn check-genders (c:Circuit) -> Circuit :
defn check-gender (info:FileInfo,genders:HashTable<Symbol,Gender>,e:Expression,desired:Gender) -> False :
val gender = get-gender(e,genders)
val kind* = get-kind(e)
+ val flip? =
+ match(type(e)) :
+ (t:BundleType) :
+ for f in fields(t) any? : flip(f) == REVERSE
+ (t) : false
+
;println(e)
;println(gender)
;println(desired)