angular-cn/packages/core/test/di
Alex Rickabaugh 7912db3829 fix(ivy): call factory functions with correct type for derived classes (#30855)
In a derived service class with no decorator (and therefore no factory) of
its own, the factory function of the base class will be used instead.
Previously this logic had a bug where the factory function would be called
with no arguments, which would incorrectly create an instance of the base
class.

This commit adds logic to call the base class' factory and pass the type of
the derived class, which will correctly construct an instance of the
derived class using the base class' factory. A test is also added to verify
correctness of this behavior.

PR Close #30855
2019-06-11 14:27:17 -07:00
..
forward_ref_spec.ts build(core): remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
injector_spec.ts build(core): remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
r3_injector_spec.ts fix(ivy): call factory functions with correct type for derived classes (#30855) 2019-06-11 14:27:17 -07:00
reflective_injector_spec.ts build: extract interface and util sub compilation from core (#28028) 2019-01-10 16:31:44 -08:00
reflective_key_spec.ts build(core): remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
static_injector_spec.ts fix(ivy): properly tree-shake away StaticInjector (#30219) 2019-04-30 21:35:54 -07:00