diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/isolation/IsolationWarningTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/isolation/IsolationWarningTest.java index 45313c669723..519c55e3efdc 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/isolation/IsolationWarningTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/isolation/IsolationWarningTest.java @@ -46,28 +46,100 @@ public void testIsolationWarnings() { int i = 0; validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 26, 5); validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 30, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 43, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 47, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 62, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 66, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 79, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 83, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 101, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 105, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 118, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 39, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 43, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 47, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 51, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 55, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 59, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 67, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 71, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 81, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 85, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 89, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 93, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 97, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 101, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 110, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 114, 5); validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 122, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 137, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 141, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 154, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 158, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 176, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 180, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 193, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 197, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 211, 5); - validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 215, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 228, 5); - validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 232, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 126, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 130, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 134, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 138, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 142, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 151, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 155, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 165, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 169, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 173, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 177, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 181, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 185, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 197, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 201, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 210, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 214, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 218, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 222, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 226, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 230, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 238, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 242, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 252, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 256, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 260, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 264, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 268, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 272, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 281, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 285, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 293, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 297, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 301, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 305, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 309, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 313, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 322, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 326, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 336, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 340, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 344, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 348, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 352, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 356, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 368, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 372, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 381, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 385, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 389, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 393, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 397, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 401, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 409, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 413, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 423, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 427, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 431, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 435, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 439, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 443, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 451, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 455, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 463, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 467, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 471, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 475, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 479, 5); + validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 483, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 492, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 496, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 506, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 510, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 514, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 518, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 522, 5); + validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 526, 5); assertEquals(result.getHintCount(), i); LineRange lineRange = result.getDiagnostics()[0].location().lineRange(); diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/isolation-analysis/isolation_warnings_for_service_methods.bal b/tests/jballerina-unit-test/src/test/resources/test-src/isolation-analysis/isolation_warnings_for_service_methods.bal index d0918ade8590..dd8cafbc771e 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/isolation-analysis/isolation_warnings_for_service_methods.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/isolation-analysis/isolation_warnings_for_service_methods.bal @@ -35,6 +35,30 @@ service on new Listener() { function func() { } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } isolated service "ser2" on new Listener() { @@ -53,6 +77,30 @@ isolated service "ser2" on new Listener() { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } // Inferred isolated. @@ -70,6 +118,30 @@ service "ser3" on new Listener() { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } service "ser4" on new Listener() { @@ -89,6 +161,30 @@ service "ser4" on new Listener() { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } //////////////////// Service Classes //////////////////// @@ -110,6 +206,30 @@ service class Serv1 { function func() { } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } isolated service class Serv2 { @@ -128,6 +248,30 @@ isolated service class Serv2 { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } // Inferred isolated. @@ -145,6 +289,30 @@ service class Serv3 { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } service class Serv4 { @@ -164,6 +332,30 @@ service class Serv4 { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } } //////////////////// Service Object Constructors //////////////////// @@ -185,6 +377,30 @@ var s1 = service object { function func() { } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } }; var s2 = isolated service object { @@ -203,6 +419,30 @@ var s2 = isolated service object { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } }; var s3 = service object { @@ -219,6 +459,30 @@ var s3 = service object { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } }; service object {} s4 = service object { @@ -238,6 +502,30 @@ service object {} s4 = service object { function func() { nonIsolatedFunc(); } + + resource function post bar(string[] mutableVal) { + _ = start mutableValueAccess(mutableVal); + } + + resource function post bas([string[], string[], string[]] args) { + _ = start passParamsAsRestArgs(...args); + } + + resource function post baz(string[] arg1, string[] arg2, string[] arg3) { + _ = start passParamsAsRestArgs(...[arg1, arg2, arg3]); + } + + resource function post qux(string[] arg1, string[] arg2, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[arg1, arg2, ...restArgs]); + } + + resource function post quxx([string[], string[]] args, string[]... restArgs) { + _ = start passRequiredArgsAndRestArgs(...[...args, ...restArgs]); + } + + resource function post quxxx(string[] arg1, string[] arg2, string[] arg3) { + _ = start passRestArgsAsArgs(arg1, arg2, arg3); + } }; function nonIsolatedFunc() { @@ -315,6 +603,18 @@ var s6 = isolated service object { } }; +isolated function mutableValueAccess(string[] value) { +} + +isolated function passParamsAsRestArgs(string[] arg1, string[] arg2, string[] arg3) { +} + +isolated function passRequiredArgsAndRestArgs(string[] arg1, string[] arg2, string[]... restArg) { +} + +isolated function passRestArgsAsArgs(string[]... restArg) { +} + public class Listener { public isolated function 'start() returns error? { return;