Open
Description
Description
When attempting to access the members
of a memberType
that is defined in the same package, using getTypeFromSymbol
on the type information, the members of the memberType cannot be accessed.
Steps to Reproduce
1. Define a Record and the function
import ballerinax/health.fhir.r4.uscore501;
public function mapPatientToUsCore(Patient patient) returns uscore501:USCorePatientProfile => {
identifier: [],
gender: "unknown",
name: []
};
public type Patient record {
string patientType;
string patientId;
};
2. Use function getTypeFromSymbol
for the USCorePatientProfile
3. Access Members of the Extension Type
When attempting to retrieve members of the Extension type using getTypeFromSymbol, the members cannot be accessed.
The type info (USCorePatientProfile.USCorePatientProfileLink.Reference.Extension
) returned appears as:
{
"memberType": {
"name": "Extension",
"optional": false,
"typeInfo": {
"name": "Extension",
"orgName": "ballerinax",
"moduleName": "health.fhir.r4",
"version": "5.2.0"
},
"defaultable": false,
"isRestType": false
},
"name": "extension",
"typeName": "array",
"optional": true,
"defaultable": false,
"isRestType": false
}
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response