Add missing case for non-parameterized generic classes. (#7952)

Fixes #7950
This commit is contained in:
Geoff Romer authored and GitHub committed 2026-10-12 19:02:57 +00:00
1 parent 9a4d4b332c
commit df4ef552ad
2 files changed
+6

No files matched your search

+3
View File
@@ -1051,6 +1051,9 @@ static auto GetLocalGenericId(ImportContext& context,
case CARBON_KIND(SemIR::FunctionType fn_type): {
return context.local_functions().Get(fn_type.function_id).generic_id;
}
case CARBON_KIND(SemIR::ClassType class_type): {
return context.local_classes().Get(class_type.class_id).generic_id;
}
case CARBON_KIND(SemIR::ParameterizedClassType class_type): {
return context.local_classes().Get(class_type.class_id).generic_id;
}
@@ -12,8 +12,11 @@
// --- generic_with_nested.carbon
package P library "generic_with_nested";
class X {};
class C(T: type) {
class Nested {
var x: X;
}
}