Make IRGenerator::call propagate poison

This fixes redundant "not a function" errors when we have already
produced an error resolving the target of a call.

Change-Id: I94876ec09feac399108033d1b850e78c7750dd1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443411
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
Ethan Nicholas 2021-08-30 16:15:20 -04:00 committed by SkCQ
parent 17c7c2f4b1
commit ace470be9a

View File

@ -1196,6 +1196,8 @@ std::unique_ptr<Expression> IRGenerator::call(int offset,
}
return this->call(offset, *functions[0], std::move(arguments));
}
case Expression::Kind::kPoison:
return functionValue;
default:
this->errorReporter().error(offset, "not a function");
return nullptr;