[valid] allow dynamic access into vectors

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2020-09-28 10:15:35 -04:00
1 parent e57d877dbc
commit 53627c5cd8
1 file changed
+5
+5
View File
@@ -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) {