James Clark
James Clark
@srinathperera @sameerajayasoma Are there common patterns for how the new wrapping error is created? I am wondering whether we can do anything to improve this aspect.
@hasithaa Usually we do, but we don't with https://ballerina.io/spec/lang/2022R4/#infer-anonymous-function-expr which seems analogous to me.
@prakanth97 That is a serious problem, I think. We need the precedence of `check ... on fail ...` to be like `let ... in ...` or `from ... select ...`,...
I think the way to approach this is to make the expression version of `on fail` more like the current statement version. In the statement version of `on fail` the...
Isn't the issue here whether the variable is module-level rather than whether it is final?
I think I'm missing something. Why would `final` mean that type narrowing doesn't apply? Does the spec say that somewhere? Why does that give a compilation error?
Being `final` make things *easier* for narrowing because you don't have to handle the possibility of the narrowing being invalidated by assignments to the variable.
I think capturing of non-final local variables is covered by this: > A narrowed type for a variable x implied by an expression in which x occurs ceases to apply...
@lochana-chathura This is a separate point from this issue. I've moved it into a new issue #1259.
You can have a environment variable whose value is TOML. At least in Linux, you can have 128k of environment variables.