-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Description
Union types that contain a nil or error as members are not handled in data mapper when the field is a union type.
Steps to Reproduce
type UserInfo record {|
string username;
string password;
Student? student;
|};
type Student record {|
string username;
string password;
string 'record;
json data;
any info;
|};
const string CONST = "CONST";
Student myStudent = {};
service OASServiceType on new http:Listener(9090) {
resource function get pet() returns int|http:NotFound {
do {
Student? student1 = {};
Student student2 = {};
UserInfo userInfo = {};
} on fail error e {
return http:NOT_FOUND;
}
}
}
Open UserInfo userInfo = {}; in data mapper
Version
1.3.0
Environment Details (with versions)
No response
Reactions are currently unavailable