Hans Leidekker (@hans) commented about dlls/rometadata/tests/rometadata.c:
+ if (FAILED(hr)) + { + skip("OpenScope failed\n"); + return; + } + + /* Get the typeref for IKeyValuePair`2 and append it. */ + hr = IMetaDataImport_FindTypeRef(md_import, mdtModule | 1, L"Windows.Foundation.Collections.IKeyValuePair`2", &kvpair_ref); + ok(hr == S_OK, "gor hr %#lx\n", hr); + /* ECMA-335 Partition II.23.2.8, "TypeDefOrRefOrSpecEncoded": + * + * 1. encode the table that this token indexes as the least significant 2 bits. The bit values to use are 0, 1 and 2, + * specifying the target table is the TypeDef, TypeRef or TypeSpec table, respectively + * 2. shift the 3-byte row index left by 2 bits and OR into the 2-bit encoding from step 1 + * 3. compress the resulting value (II.23.2) + */ I think a reference to the spec paragraph would be sufficient.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11719#note_149502