GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — Allowed non-this, non-super code before super call in derived classes with property initializers by JoshuaKGoldberg · Pull Request #29374 · microsoft/TypeScript Conversation
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…boundaries
```ts
function () {
return this;
}
```
It was immediately going to `ts.forEachChild` so the statement itself wasn't being counted as a new `this` scope.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is getting very complex very fast. I wonder if there's an easier way using the control flow graph?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
As per discussion in the issue, it would be ideal to consider any block that always ends up calling to super() the equivalent of a root-level super() statement. This would be valid:
```ts
foo = 1;
constructor() {
condition() ? super(1) : super(0);
this.foo;
}
```
...as it would compile to the equivalent of:
```ts
function () {
condition() ? super(1) : super(0);
this.foo = 1;
this.foo;
}
That change would a bit more intense and I'm very timid, so leaving it out of this PR. In the meantime the requirement is that the super() statement must itself be root-level.
There was an error while loading. Please reload this page.
|
cc Anders Hejlsberg (@ahejlsberg) for review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ping Anders Hejlsberg (@ahejlsberg) - is there anything that needs to be done here? It'd be nice to have this in 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Correction: ping, Wesley Wigham (@weswigham)? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ron Buckton (@rbuckton) Is there anything else that Josh Ghoulberg 👻 (@JoshuaKGoldberg) can do to move this forward? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
TypeScript Bot (@typescript-bot) user test this inline |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Heya Ron Buckton (@rbuckton), I'm starting to run the inline community code test suite on this PR at 1b3dd6d. Hold tight - I'll update this comment with the log link once the build has been queued. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Nope, it looks ready to go actually, and just in time for 4.6 beta. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Fantastic, thanks so much for the reviews & merge Ron Buckton (@rbuckton)! If any issues come out of this change I'm available to try to fix, if that's helpful. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The longest-living PR I have ever seen. 😳 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
YES!!! Thank you!🎉 🎉 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🥳🎉🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Amazing work and perseverance. Awesome! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Man! Awesome. The perseverance! 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Does it mean that now super is going to be invoked the first time never mind where he is located in the constructor? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…rosoft/TypeScript#29374 The minimum TypeScript dependency is lifted to 4.6.2
|
Congrats, apparently the cake did it's job! 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Guy you've made it reddit programmer humor front page! https://www.reddit.com/r/ProgrammerHumor/comments/waa0lz/if_youre_ever_frustrated_that_your_github_prs/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
grats on the PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Congrats !! Happy for you! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.