refactor(ivy): remove ngBaseDef (#33264)
Removes `ngBaseDef` from the compiler and any runtime code that was still referring to it. In the cases where we'd previously generate a base def we now generate a definition for an abstract directive. PR Close #33264
This commit is contained in:
@ -214,6 +214,37 @@ describe('inheritance', () => {
|
||||
|
||||
expect(log).toEqual(['on changes!']);
|
||||
});
|
||||
|
||||
it('should be inherited from undecorated super class which inherits from decorated one', () => {
|
||||
let changes = 0;
|
||||
|
||||
abstract class Base {
|
||||
// Add an Input so that we have at least one Angular decorator on a class field.
|
||||
@Input() inputBase: any;
|
||||
abstract input: any;
|
||||
}
|
||||
|
||||
abstract class UndecoratedBase extends Base {
|
||||
abstract input: any;
|
||||
ngOnChanges() { changes++; }
|
||||
}
|
||||
|
||||
@Component({selector: 'my-comp', template: ''})
|
||||
class MyComp extends UndecoratedBase {
|
||||
@Input() input: any;
|
||||
}
|
||||
|
||||
@Component({template: '<my-comp [input]="value"></my-comp>'})
|
||||
class App {
|
||||
value = 'hello';
|
||||
}
|
||||
|
||||
TestBed.configureTestingModule({declarations: [MyComp, App]});
|
||||
const fixture = TestBed.createComponent(App);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(changes).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('of bare super class by a directive', () => {
|
||||
|
Reference in New Issue
Block a user