feat(di): drop support for injecting types with generics in Dart

BREAKING CHANGE:
In Dart we used to support injecting types with generics. As this feature is hard to implement with the upcoming codegen we are dropping it.

Merge cl/115454020 in G3 with this change.
Closes #7262
This commit is contained in:
Tobias Bosch
2016-02-24 09:45:10 -08:00
parent f72f137261
commit c9a3df970b
9 changed files with 1 additions and 144 deletions
@@ -42,27 +42,6 @@ void functionThatThrowsNonError() {
}
main() {
describe('TypeLiteral', () {
it(
'should publish via viewBindings',
inject([TestComponentBuilder, AsyncTestCompleter], (tb, async) {
tb
.overrideView(
Dummy,
new ViewMetadata(
template:
'<type-literal-component></type-literal-component>',
directives: [TypeLiteralComponent]))
.createAsync(Dummy)
.then((tc) {
tc.detectChanges();
expect(asNativeElements(tc.debugElement.children))
.toHaveText('[Hello, World]');
async.done();
});
}));
});
describe('Error handling', () {
it(
'should preserve Error stack traces thrown from components',
@@ -216,19 +195,6 @@ class Dummy {
dynamic value;
}
@Component(
selector: 'type-literal-component',
viewBindings: const [
const Binding(const TypeLiteral<List<String>>(),
toValue: const <String>['Hello', 'World'])
])
@View(template: '{{list}}')
class TypeLiteralComponent {
final List<String> list;
TypeLiteralComponent(this.list);
}
@Component(selector: 'throwing-component')
@View(template: '')
class ThrowingComponent {