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

Fix ICE by avoiding copyForLocation() on ArraySliceType #9027

Merged
merged 1 commit into from May 26, 2020
Merged

Conversation

Marenz
Copy link
Contributor

@Marenz Marenz commented May 26, 2020

fixes #8265

@@ -2555,7 +2555,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)

if (possibleMembers.empty())
{
if (initialMemberCount == 0)
if (initialMemberCount == 0 && !dynamic_cast<ArraySliceType const*>(exprType))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This solution is very specific to the issue that this fixes. I am open to suggestions to make this more generic to work with all types that would fail for a withLocation() call

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not pretty, but this code will be gone with 0.7.0, so I would say it's fine.

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.

ArraySliceType::copyForLocation assertion failure
2 participants