Fix ICE by avoiding copyForLocation() on ArraySliceType

This commit is contained in:
Mathias Baumann
2020-05-26 17:27:46 +02:00
parent 5fedb4eab0
commit b3cafe4583
4 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -2555,7 +2555,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
if (possibleMembers.empty())
{
if (initialMemberCount == 0)
if (initialMemberCount == 0 && !dynamic_cast<ArraySliceType const*>(exprType))
{
// Try to see if the member was removed because it is only available for storage types.
auto storageType = TypeProvider::withLocationIfReference(