halildurmus/winmd

Generic types like `Foo<Bar<T>, Baz>` are parsed incorrectly

Closed this issue · 0 comments

GetSmsMessagesOperation Class implements IAsyncOperationWithProgress<IVectorView<ISmsMessage>, int>.

This type is currently being parsed incorrectly:

import 'package:winmd/winmd.dart';

void main() {
  final typeDef = MetadataStore.getMetadataForType(
      'Windows.Devices.Sms.GetSmsMessagesOperation')!;
  final aowp = typeDef.interfaces.first.typeSpec!;
  print(aowp.type); // prints Windows.Foundation.IAsyncOperationWithProgress`2
  print(aowp.typeArg); // prints IVectorView`1
  print(aowp.typeArg?.typeArg); // prints [int32Type] instead of ISmsMessage
  print(aowp.typeArg?.typeArg?.typeArg); // prints null instead of [int32Type]
}

As you can see, the type argument of IVectorView (ISmsMessage) seems to be missing.