mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
No more lowercase for opaques
This commit is contained in:
parent
5e47e4767e
commit
ca7c9ec5e6
6 changed files with 31 additions and 20 deletions
|
@ -1022,7 +1022,10 @@ pub fn constrain_expr(
|
|||
|
||||
let opaque_type = Type::Alias {
|
||||
symbol: *name,
|
||||
type_arguments: type_arguments.clone(),
|
||||
type_arguments: type_arguments
|
||||
.iter()
|
||||
.map(|v| ("".into(), Type::Variable(*v)))
|
||||
.collect(),
|
||||
lambda_set_variables: lambda_set_variables.clone(),
|
||||
actual: Box::new(arg_type.clone()),
|
||||
kind: AliasKind::Opaque,
|
||||
|
@ -1059,9 +1062,7 @@ pub fn constrain_expr(
|
|||
|
||||
let mut vars = vec![*arg_var, *opaque_var];
|
||||
// Also add the fresh variables we created for the type argument and lambda sets
|
||||
vars.extend(type_arguments.iter().map(|(_, t)| {
|
||||
t.expect_variable("all type arguments should be fresh variables here")
|
||||
}));
|
||||
vars.extend(type_arguments);
|
||||
vars.extend(lambda_set_variables.iter().map(|v| {
|
||||
v.0.expect_variable("all lambda sets should be fresh variables here")
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue