Skip to content

Commit eff1351

Browse files
committed
Fix bug with resolving an array.domain called dot expr
Signed-off-by: Anna Rift <[email protected]>
1 parent c84d646 commit eff1351

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/lib/resolution/Resolver.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -5648,9 +5648,13 @@ void Resolver::exit(const Dot* dot) {
56485648

56495649
// Try to resolve a it as a field/parenless proc so we can resolve 'this' on
56505650
// it later if needed.
5651+
// Special case: Don't try to resolve calls to array.domain here, as we
5652+
// need to proceed to the handling logic below.
56515653
if (!receiver.type().isUnknown() && receiver.type().type() &&
56525654
receiver.type().type()->getCompositeType() &&
5653-
dot->field() != "init") {
5655+
dot->field() != USTR("init") &&
5656+
!(receiver.type().type()->isArrayType() &&
5657+
dot->field() == USTR("domain"))) {
56545658
std::vector<CallInfoActual> actuals;
56555659
actuals.push_back(CallInfoActual(receiver.type(), USTR("this")));
56565660
auto ci = CallInfo(/* name */ dot->field(),

0 commit comments

Comments
 (0)