Add (possibly temporary) assertion on record access in codegen
This commit is contained in:
parent
3dd94983bd
commit
92a1da69d9
|
@ -647,6 +647,11 @@ impl<'a> CodeGenerator<'a> {
|
||||||
record,
|
record,
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
|
assert!(
|
||||||
|
!record.tipo().is_pair(),
|
||||||
|
"illegal record access on a Pair. This should have been a tuple-index access."
|
||||||
|
);
|
||||||
|
|
||||||
if check_replaceable_opaque_type(&record.tipo(), &self.data_types) {
|
if check_replaceable_opaque_type(&record.tipo(), &self.data_types) {
|
||||||
self.build(record, module_build_name, &[])
|
self.build(record, module_build_name, &[])
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue