Skip to content

Commit f7d0c12

Browse files
manodasanWCopilot
andcommitted
Track IObservableMap<K,V> Impl type in the interop generator
The IObservableMap2 Impl builder created the Impl type but never registered it via emitState.TrackTypeDefinition (unlike IObservableVector1, IList1, IDictionary2, etc.). As a result, a user-defined type implementing IObservableMap<K,V> (e.g. ObservableDictionary) failed CCW/vtable generation with CSWINRTINTEROPGEN0024 (Impl lookup miss) wrapped as CSWINRTINTEROPGEN0039. Track it like the other collection Impl builders. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 16cfdeb commit f7d0c12

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/WinRT.Interop.Generator/Builders/InteropTypeDefinitionBuilder.IObservableMap2.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ public static void ImplType(
531531
implType.Methods.Add(makeMapChangedMethod);
532532
implType.Methods.Add(get_MapChangedTableMethod);
533533
implType.Properties.Add(mapChangedTableProperty);
534+
535+
// Track the type (it may be needed by COM interface entries for user-defined types)
536+
emitState.TrackTypeDefinition(implType, mapType, "Impl");
534537
}
535538
}
536539
}

0 commit comments

Comments
 (0)