Fix more tests and issues
This commit is contained in:
parent
6e94d502a7
commit
25e4b42cd0
|
@ -1039,9 +1039,11 @@ impl<'a, 'b> TreeGen<'a, 'b> {
|
||||||
unreachable!("{:#?}", current_tipo)
|
unreachable!("{:#?}", current_tipo)
|
||||||
};
|
};
|
||||||
elems.len()
|
elems.len()
|
||||||
} else if let Some(data) = lookup_data_type_by_tipo(self.data_types, subject_tipo) {
|
} else if let Some(data) = lookup_data_type_by_tipo(self.data_types, ¤t_tipo) {
|
||||||
if data.constructors.len() == 1 {
|
if data.constructors.len() == 1 {
|
||||||
data.constructors[0].arguments.len()
|
data.constructors[0].arguments.len()
|
||||||
|
} else if data.is_never() {
|
||||||
|
0
|
||||||
} else {
|
} else {
|
||||||
MIN_NEW_COLUMNS
|
MIN_NEW_COLUMNS
|
||||||
}
|
}
|
||||||
|
@ -1092,7 +1094,7 @@ impl<'a, 'b> TreeGen<'a, 'b> {
|
||||||
} => {
|
} => {
|
||||||
let data_type = lookup_data_type_by_tipo(self.data_types, ¤t_tipo).unwrap();
|
let data_type = lookup_data_type_by_tipo(self.data_types, ¤t_tipo).unwrap();
|
||||||
|
|
||||||
if data_type.constructors.len() == 1 {
|
if data_type.constructors.len() == 1 || data_type.is_never() {
|
||||||
arguments
|
arguments
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
|
|
Loading…
Reference in New Issue