2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////class CollectionItem {
|
|
|
|
//// x: number;
|
|
|
|
////}
|
|
|
|
|
|
|
|
////class Entity extends CollectionItem {
|
|
|
|
//// y: number;
|
|
|
|
////}
|
|
|
|
|
|
|
|
////class BaseCollection<TItem extends CollectionItem> {
|
|
|
|
//// _itemsByKey: { [key: string]: TItem; };
|
|
|
|
////}
|
|
|
|
|
|
|
|
////class DbSet<TEntity extends Entity> extends BaseCollection<TEntity> { // error
|
|
|
|
//// _itemsByKey: { [key: string]: TEntity; };
|
|
|
|
////}
|
|
|
|
|
|
|
|
////var a: BaseCollection<CollectionItem>;
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /**/r = a._itemsByKey['x']; // should just say CollectionItem not TItem extends CollectionItem
|
2014-07-13 01:04:16 +02:00
|
|
|
////var result = r.x;
|
|
|
|
|
|
|
|
////a = new DbSet<Entity>();
|
|
|
|
////var r2 = a._itemsByKey['x'];
|
|
|
|
////var result2 = r2.x;
|
|
|
|
|
|
|
|
goTo.marker('');
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs('(var) r: CollectionItem');
|
2014-07-13 01:04:16 +02:00
|
|
|
verify.numberOfErrorsInCurrentFile(0);
|