mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Merge remote-tracking branch 'origin/trunk' into div-no-result
This commit is contained in:
commit
8206f345c7
46 changed files with 1685 additions and 291 deletions
|
@ -5319,6 +5319,21 @@ mod solve_expr {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn to_float() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
{
|
||||
toF32: Num.toF32,
|
||||
toF64: Num.toF64,
|
||||
}
|
||||
"#
|
||||
),
|
||||
r#"{ toF32 : Num * -> F32, toF64 : Num * -> F64 }"#,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn opaque_wrap_infer() {
|
||||
infer_eq_without_problem(
|
||||
|
@ -5407,7 +5422,7 @@ mod solve_expr {
|
|||
condition : Bool
|
||||
|
||||
v : Id [ Y Str, Z Str ]
|
||||
v =
|
||||
v =
|
||||
if condition
|
||||
then $Id (Id 21 (Y "sasha"))
|
||||
else $Id (Id 21 (Z "felix"))
|
||||
|
@ -5682,4 +5697,17 @@ mod solve_expr {
|
|||
"Result I64 [ InvalidNumStr, ListWasEmpty ]*",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lots_of_type_variables() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
fun = \a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb -> {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb}
|
||||
fun
|
||||
"#
|
||||
),
|
||||
"a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, bb -> { a : a, aa : aa, b : b, bb : bb, c : c, d : d, e : e, f : f, g : g, h : h, i : i, j : j, k : k, l : l, m : m, n : n, o : o, p : p, q : q, r : r, s : s, t : t, u : u, v : v, w : w, x : x, y : y, z : z }",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue