ran into another type inference problem
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use crate::eval::PrimitiveType;
|
||||
use crate::ir::{Expression, Primitive, Program, TopLevel, Type, TypeWithVoid, Value, ValueOrRef, Variable};
|
||||
use crate::ir::{
|
||||
Expression, Primitive, Program, TopLevel, Type, TypeWithVoid, Value, ValueOrRef, Variable,
|
||||
};
|
||||
use crate::syntax::Location;
|
||||
use crate::util::scoped_map::ScopedMap;
|
||||
use proptest::strategy::{NewTree, Strategy, ValueTree};
|
||||
@@ -300,7 +302,8 @@ fn generate_random_expression(
|
||||
if !next_type.is_void() {
|
||||
let name = generate_random_name(rng);
|
||||
env.insert(name.clone(), next_type.clone());
|
||||
next = Expression::Bind(Location::manufactured(), name, next_type, Box::new(next));
|
||||
next =
|
||||
Expression::Bind(Location::manufactured(), name, next_type, Box::new(next));
|
||||
}
|
||||
stmts.push(next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user