Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
DimuthuMadushan committed Jan 13, 2022
1 parent 54127b1 commit 7a89708
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
6 changes: 0 additions & 6 deletions ballerina/tests/08_unions_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@

import ballerina/test;

type Information Address|Person;

type Details record {
Information information;
};

@test:Config {
groups: ["union"]
}
Expand Down
2 changes: 0 additions & 2 deletions ballerina/tests/19_distinct_service_unions.bal
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

import ballerina/test;

type Services StudentService|TeacherService;

@test:Config {
groups: ["service", "union"]
}
Expand Down
6 changes: 4 additions & 2 deletions ballerina/tests/object_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
// specific language governing permissions and limitations
// under the License.

type Services StudentService|TeacherService;

type SearchResult Lift|Trail;

isolated service class Name {
isolated resource function get first() returns string {
return "Sherlock";
Expand Down Expand Up @@ -46,8 +50,6 @@ distinct isolated service class HierarchicalName {
}
}

type SearchResult Lift|Trail;

distinct isolated service class Lift {
private final readonly & LiftRecord lift;

Expand Down
5 changes: 5 additions & 0 deletions ballerina/tests/records.bal
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
// specific language governing permissions and limitations
// under the License.

type Information Address|Person;

type Details record {
Information information;
};
public type Address readonly & record {
string number;
string street;
Expand Down
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- [[#2500] Fix returning NPE when multiple file uploading](https://github.com/ballerina-platform/ballerina-standard-library/issues/2500)
- [[#2518] Fix Intermittently Skipping Fields when Executing Resources](https://github.com/ballerina-platform/ballerina-standard-library/issues/2518)
- [[#2552] Fix returning error when querying a union type includes a field returns an object](https://github.com/ballerina-platform/ballerina-standard-library/issues/2552)
- [[#2571] Fix service crashing when fields return nullable, union type arrays](https://github.com/ballerina-platform/ballerina-standard-library/issues/2571)
- [[#2571] Fix Service Crashing when Fields Return Nullable, Union Type Arrays](https://github.com/ballerina-platform/ballerina-standard-library/issues/2571)
- [[#2578] Fix Incorrect Response Returning for GraphQL Scalar Type Arrays](https://github.com/ballerina-platform/ballerina-standard-library/issues/2578)

## [1.1.0] - 2021-12-14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ static boolean isScalarType(Type type) {
if (memberType.size() == 1) {
return isScalarType(memberType.get(0));
}
return false;
}
return tag == INT_TAG || tag == FLOAT_TAG || tag == BOOLEAN_TAG || tag == STRING_TAG;
}
Expand Down

0 comments on commit 7a89708

Please sign in to comment.