Misleading compiler error “is a ‘type’ but is used like a ‘variable'”

The following C# line to call AutoFixture method
fixture.Create<List<List<FlightItem>>();
Caused Error     63     ‘System.Collections.Generic.List<System.Collections.Generic.List<BusinessEntities.FlightItem>>’ is a ‘type’ but is used like a ‘variable’     
It wasn’t obvious, that closing ‘>’ was missing.
 I believe  that compiler can recognize and provide better error message.
Advertisements