rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
159 stars 46 forks source link

type mismatch for anonymous AA and interface #1102

Closed TwitchBronBron closed 6 months ago

TwitchBronBron commented 6 months ago

Returning an AA literal with a nested AA that conforms to an interface is being incorrectly flagged as a type mismatch.

image

Here's the source code.

namespace alpha.beta

    interface Stream
        thumbnailTiler as Thumbnail
    end interface

    interface Thumbnail
        count as integer
    end interface

    function createStreamObject() as Stream
        return {
            thumbnailTiler: {
                count: 1
            }
        }
    end function
end namespace
markwpearce commented 6 months ago

this is only because the count property is being overridden.

TwitchBronBron commented 6 months ago

It's still a bug, right? We should be able to override the .count property?