Open manuranga opened 3 years ago
This error is logged when the checked error is not handled. e.g, the enclosing function/worker doesn't have error in the return type.
The following works.
import ballerina/file;
public function main() returns error? {
check from var entry in check file:readDir("")
do {
};
}
Can we close this since it isn't a bug?
from var entry in check file:readDir(SOURCE_DIR)
do {
};
I remember it worked when I moved check file:readDir(SOURCE_DIR)
to the previous line. Could be misremembering. Please close if it work.
above gives
invalid usage of the 'check' expression operator: no matching error return type(s) in the enclosing invokable