File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
MetadataProcessor.Shared/Tables Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,22 @@ public bool TryGetTypeReferenceId(
101101 TypeReference typeReference ,
102102 out ushort referenceId )
103103 {
104- return _idByTypeSpecifications . TryGetValue ( typeReference , out referenceId ) ;
104+ if ( typeReference == null ) // This case is possible for encoding 'nested inside' case
105+ {
106+ referenceId = 0xFFFF ;
107+ return true ;
108+ }
109+
110+ referenceId = GetOrCreateTypeSpecificationId ( typeReference ) ;
111+
112+ return true ;
105113 }
106114
107115 public TypeReference TryGetTypeSpecification ( MetadataToken token )
108116 {
109117 foreach ( var t in _idByTypeSpecifications )
110118 {
111- if ( t . Key . MetadataToken == token )
119+ if ( t . Key . MetadataToken == token )
112120 {
113121 return t . Key ;
114122 }
You can’t perform that action at this time.
0 commit comments