0
votes

Good morning,

today, I had a problem with using a base flow definition and two types that extend the base definition.

There's an array where each element could either match the First or Second type definition. When looping this array, I only want to handle elements matching the First type definition, so I thought it should be done by checking a property that only exists in the definition of First and if this property does not exist, this element should be skipped.

However, I don't get to the point where the check for the property does also tell flow that this property can now be accessed.

I made a small script on flow.org where you can see my problem: https://flow.org/try/#0PTAEAEDMBsHsHcBQAXAngBwKagEIEMBnbAXlAG9FQrQA7PAW0wC5QDkAnASxoHMAaRAF8A3IhQZsAMU7s2oUviKgAZOUrVIMtiwrU9oAG55oAV2asO3fuqqCBIsWiygAypgDGsGgBN5uQtiqutREnj46NvpGpuZsXLwCenZCoohhcpjQmIw0yAQsAILs7HioADzSssigAD6uHl7eAHx+ANqRZLQM5gDkAIw9fKCaVTqGxmYs-T2ggrOJ1J10jFMATIOsDeHk4zFrM3PJALqpmdmYuQQAdJCw7ACieO4AFgAUr2c5yCyVcnVuYW8AEoWAZYJxfMQWsEqCBQL9qhxUExIpxIKBXgBCT4XZA3LTIIE7diYZAmdg0YSzMR6OEAxqgJEovRojGY149EZsGbcUA43JAomdElkilUwQ06hwgAqzxkviZqPRWP5eOehAA8vAaAAFdiwLDsNAcrnIHqC4mk8mU6mRdKwLJXOA8D5ZL74qpA0SCL2IIA

After all, it works when I manually type cast the element to suppress the intersection warning from flow, but in my head, this should not be necessary?

Thanks in advance :)

1

1 Answers