An Option plus a literal is refused at the operator, the literal having been wrapped.

This commit is contained in:
Joseph Ferano 2026-09-26 17:16:16 +07:00
parent cb60df1dc0
commit 09f1e4369f

View File

@ -1473,7 +1473,7 @@ let () =
refused "addr-taken.fln"
"fn clear(p: Ptr(i32?))\n deref(p) = None\n\nfn main()\n let x: i32? = Some(1)\n\
\ let p = addr(x)\n if x?\n clear(p)\n println(x + 1)\n"
[ "expected Option(i32)" ];
[ "+ takes numbers, found Option(i32)" ];
refused "capital-local.fln" "fn main()\n let X: i32? = Some(1)\n println(X?)\n"
[ "To test the local X, give it a lowercase name, as in x?" ];
checks "addr-taken-test.fln"