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

Allow subscripts to have methods called #2735

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

advikkabra
Copy link
Collaborator

g: dict[i32, list[i32]] = {}
g[0] = []
g[0].append(1)

Now this code can work, as previously subscripts couldn't have methods called on them (a[b].c())
I am not sure how/where to test this.

Copy link
Collaborator

@czgdp1807 czgdp1807 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests for this change.

@czgdp1807 czgdp1807 force-pushed the subscript-methods branch from 59a0aa0 to 27731c9 Compare July 12, 2024 10:51
@advikkabra advikkabra merged commit 44068ce into lcompilers:main Jul 12, 2024
15 checks passed
@advikkabra advikkabra deleted the subscript-methods branch July 12, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants