You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classBase{}exportclassFooextendsBase{constructor(privatemember: boolean,){'ngInject';super();console.log(' where did this go???');// <<<<< this line gets omitted in generated javascript code}}
🙁 Actual behavior
Javascript output does not include the console.log statement.
FYI:
I can see variants of this issue also happen in 4.6.2, 4.6.3 and 4.6.4.
So basically this has been broken since 4.6.0
Would it be possible to push the fix to the new 4.7.X, as otherwise we will have to resort to ugly hacks (noop line) to get stuff working.
I think it is a very silent bug that basically all hybrid applications will have to deal with when they migrate to angular 14 ( as you can only use typescript 4.6.X+ for angular 14)
Here is an example of the issue that is present on all versions after 4.5.5.
Code
class Base{
}
export class Foo extends Base{
public currentYear: number = new Date().getFullYear();
constructor(
private member: boolean,
) {
'ngInject';
super();
console.log(' where did this go???'); // <<<<< this line gets omitted in generated javascript code
}
}
Bug Report
Emitted javascript omits a line of code that should be be there.
🔎 Search Terms
Code Generation, omitted line, missing, super
🕗 Version & Regression Information
This issues does not happen in 4.6.4, but does ever after.
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Javascript output does not include the console.log statement.
🙂 Expected behavior
All the code should make it through. If you duplicate the log line, then one of them will come through.
The text was updated successfully, but these errors were encountered: