-
Couldn't load subscription status.
- Fork 13.1k
Report error if class uses extended type before its declaration #4343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would also add a test with an expression in an extend clause, class A extends foo(0)<string> {}
and one for module aliases
import d from "mod";
class B extends d { // no error here
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this
… report error Fixes #4244
|
I am still working on reporting error if alias is declared before it is referencing entity(internal alias only) |
src/compiler/checker.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are they allowed to be in different lexical scopes?
src/compiler/checker.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ts.indexOf instead of array.prototype.indexof
src/compiler/checker.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix spacing at the end of the line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isDefinedBeforeOrAt
|
This PR is superseded by #8636 which has been successfully merged, right? |
|
closing in favor of #8636 |
Fixes #4341