We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ec9803 commit 7d0e041Copy full SHA for 7d0e041
lib/SILOptimizer/Differentiation/PullbackCloner.cpp
@@ -225,7 +225,11 @@ class PullbackCloner::Implementation final
225
getPullback().getLoweredFunctionType()->getSubstGenericSignature());
226
auto remappedSILType =
227
SILType::getPrimitiveType(remappedType, ty.getCategory());
228
- return getPullback().mapTypeIntoContext(remappedSILType);
+ // FIXME: Sometimes getPullback() doesn't have a generic environment, in which
229
+ // case callers are apparently happy to receive an interface type.
230
+ if (getPullback().getGenericEnvironment())
231
+ return getPullback().mapTypeIntoContext(remappedSILType);
232
+ return remappedSILType;
233
}
234
235
std::optional<TangentSpace> getTangentSpace(CanType type) {
0 commit comments