Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to parse IVectorView #44

Closed
Sunbreak opened this issue Jun 11, 2021 · 0 comments · Fixed by #45
Closed

Fail to parse IVectorView #44

Sunbreak opened this issue Jun 11, 2021 · 0 comments · Fixed by #45

Comments

@Sunbreak
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant