mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 01:48:12 +00:00
Add missing case for non-parameterized generic classes. (#7952)
Fixes #7950
This commit is contained in:
1 parent
9a4d4b332c
commit
df4ef552ad
2 files changed
+6
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user