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 a08d141 commit 77c3f15Copy full SHA for 77c3f15
lib/SILOptimizer/Differentiation/PullbackCloner.cpp
@@ -224,7 +224,11 @@ class PullbackCloner::Implementation final
224
getPullback().getLoweredFunctionType()->getSubstGenericSignature());
225
auto remappedSILType =
226
SILType::getPrimitiveType(remappedType, ty.getCategory());
227
- return getPullback().mapTypeIntoContext(remappedSILType);
+ // FIXME: Sometimes getPullback() doesn't have a generic environment, in which
228
+ // case callers are apparently happy to receive an interface type.
229
+ if (getPullback().getGenericEnvironment())
230
+ return getPullback().mapTypeIntoContext(remappedSILType);
231
+ return remappedSILType;
232
}
233
234
std::optional<TangentSpace> getTangentSpace(CanType type) {
0 commit comments