From 53627c5cd865a06afe3ca65f5318bf4549f1b34d Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Mon, 28 Sep 2020 01:41:50 -0400 Subject: [PATCH] [valid] allow dynamic access into vectors --- src/proc/typifier.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/proc/typifier.rs b/src/proc/typifier.rs index 9db625c41a..a02def71ef 100644 --- a/src/proc/typifier.rs +++ b/src/proc/typifier.rs @@ -93,6 +93,11 @@ impl Typifier { Ok(match *expr { crate::Expression::Access { base, .. } => match *self.get(base, types) { crate::TypeInner::Array { base, .. } => Resolution::Handle(base), + crate::TypeInner::Vector { + size: _, + kind, + width, + } => Resolution::Value(crate::TypeInner::Scalar { kind, width }), ref other => panic!("Can't access into {:?}", other), }, crate::Expression::AccessIndex { base, index } => match *self.get(base, types) {