Skip to content

Commit b65480d

Browse files
Change Groups object to public
1 parent 7cbd327 commit b65480d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ballerina/types.bal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# + matched - Matched substring
2020
# + startIndex - The start index of the match
2121
# + endIndex - The last index of the match
22-
type PartMatch record {|
22+
public type PartMatch record {|
2323
string matched;
2424
int startIndex;
2525
int endIndex;
@@ -33,7 +33,7 @@ public type Groups readonly & object {
3333
// Capture groups are indexed from 1
3434
// Group 0 means whole regex
3535
// Panics if i < 0 or > count
36-
isolated function get(int index) returns PartMatch?;
36+
public isolated function get(int index) returns PartMatch?;
3737
};
3838

3939
# Holds the results of a match against a regular expression.

ballerina/utils.bal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ readonly class MatchGroups {
4747
self.count = groupCount;
4848
}
4949

50-
isolated function get(int index) returns PartMatch? {
50+
public isolated function get(int index) returns PartMatch? {
5151
if index < 0 || index > self.count {
5252
panic error("There is no capturing group in the pattern with the given index " + index.toString() + ".");
5353
}

0 commit comments

Comments
 (0)