File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -379,12 +379,7 @@ codeql::KeyPathExpr ExprTranslator::translateKeyPathExpr(const swift::KeyPathExp
379
379
entry.components .push_back (emitKeyPathComponent (component));
380
380
}
381
381
if (auto rootTypeRepr = expr.getExplicitRootType ()) {
382
- auto keyPathType = expr.getType ()->getAs <swift::BoundGenericClassType>();
383
- CODEQL_EXPECT_OR (return entry, keyPathType, " KeyPathExpr must have BoundGenericClassType" );
384
- auto keyPathTypeArgs = keyPathType->getGenericArgs ();
385
- CODEQL_EXPECT_OR (return entry, keyPathTypeArgs.size () != 0 ,
386
- " KeyPathExpr type must have generic args" );
387
- entry.root = dispatcher.fetchLabel (rootTypeRepr, keyPathTypeArgs[0 ]);
382
+ entry.root = dispatcher.fetchLabel (rootTypeRepr, expr.getRootType ());
388
383
}
389
384
}
390
385
return entry;
You can’t perform that action at this time.
0 commit comments