Fail to parse `IVectorView`
Closed this issue · 0 comments
Sunbreak commented
import 'package:winmd/winmd.dart';
void main() {
// A Windows Runtime interface
const typeToGenerate = 'Windows.Foundation.Collections.IVectorView`1';
// Load the metadata for this interface
final typeDef = MetadataStore.getMetadataForType(typeToGenerate)!;
// Create a Dart projection
print('$typeToGenerate contains the following methods:');
for (final method in typeDef.methods) {
print(' ${method.name}');
}
}
results in
Windows.Foundation.Collections.IVectorView`1 contains the following methods:
Unhandled exception:
WinmdException: Unrecognized or internal type 0
#0 parseCorElementType
package:winmd/…/com/constants.dart:198
#1 new TypeIdentifier.fromValue
package:winmd/src/typeidentifier.dart:46
#2 new TypeTuple.fromSignature
package:winmd/…/utils/typetuple.dart:30
#3 Method._parseMethodDefSig
package:winmd/src/method.dart:330
#4 Method._parseSignatureBlob
package:winmd/src/method.dart:272
#5 new Method
package:winmd/src/method.dart:83
#6 new Method.fromToken
package:winmd/src/method.dart:113
#7 TypeDef.methods
package:winmd/src/typedef.dart:383
#8 main
example\main.dart:19
#9 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
#10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Exited (255)