Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayAccess does not appear to work on discriminated object types #775

Open
majastrz opened this issue Nov 2, 2020 · 1 comment
Open
Labels
bug Something isn't working type system

Comments

@majastrz
Copy link
Member

majastrz commented Nov 2, 2020

I found this by reading the source of VisitArrayAccessSyntax in the TypeAssignmentVisitor class. We don't appear to have a case for discriminated object types.

In a similar vein, the AreTypesAssignable method will not return correct result when target type is object and the source type is a discriminated object type.

@ghost ghost added the Needs: Triage 🔍 label Nov 2, 2020
@majastrz majastrz added bug Something isn't working and removed Needs: Triage 🔍 labels Nov 2, 2020
@majastrz
Copy link
Member Author

Need to verify this isn't fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working type system
Projects
None yet
Development

No branches or pull requests

3 participants