-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support classExpressions in DTE #101
Support classExpressions in DTE #101
Conversation
to see where it's actually being used. Signed-off-by: Hana Joo <hanajoo@google.com>
7d5174e
to
39bbe59
Compare
This is a non-functional move. Signed-off-by: Hana Joo <hanajoo@google.com>
as it's doing trivial bitwise OR operation, also some other parts of the code is doing |= instead, so try to be consistent. Signed-off-by: Hana Joo <hanajoo@google.com>
if there's any error reported. Signed-off-by: Hana Joo <hanajoo@google.com>
to reduce unncessary type checks Signed-off-by: Hana Joo <hanajoo@google.com>
Also, avoid unncessary work caused by calling invalid(), rather call reportIsolatedDeclarationError instead as it was the only thing intended. Signed-off-by: Hana Joo <hanajoo@google.com>
Signed-off-by: Hana Joo <hanajoo@google.com>
Signed-off-by: Hana Joo <hanajoo@google.com>
These seems all reasonable, we might have missed something before that was not updated. Signed-off-by: Hana Joo <hanajoo@google.com>
95c6bdc
to
a990f05
Compare
Signed-off-by: Hana Joo <hanajoo@google.com>
a990f05
to
e9ca3d4
Compare
This commit is totally non-functional Signed-off-by: Hana Joo <hanajoo@google.com>
src/compiler/transformers/declarations/localInferenceResolver.ts
Outdated
Show resolved
Hide resolved
src/compiler/transformers/declarations/localInferenceResolver.ts
Outdated
Show resolved
Hide resolved
let C = (() => { | ||
let _classDecorators = [dec]; | ||
let _classDescriptor; | ||
let _classExtraInitializers = []; | ||
let _classThis; | ||
var C = class { | ||
static { _classThis = this; } | ||
static { | ||
__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); | ||
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; | ||
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); | ||
C = _classThis = _classDescriptor.value; | ||
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); | ||
__runInitializers(_classThis, _classExtraInitializers); | ||
} | ||
}; | ||
return C = _classThis; | ||
})(); | ||
export default C; |
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.
Do we know why this changed ?
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 have no idea, this seemed to be broken already in the target branch, but I don't have a good imagination to understand what would have caused this to change.
src/compiler/transformers/declarations/localInferenceResolver.ts
Outdated
Show resolved
Hide resolved
src/compiler/transformers/declarations/localInferenceResolver.ts
Outdated
Show resolved
Hide resolved
src/compiler/transformers/declarations/localInferenceResolver.ts
Outdated
Show resolved
Hide resolved
1. Reuse reusable chunk of code. 2. Proper handling of accessors, before it treated as if there were only a single accessor in the class. 3. Improve wording in the error message for heritage clauses Signed-off-by: Hana Joo <hanajoo@google.com>
src/compiler/transformers/declarations/localInferenceResolver.ts
Outdated
Show resolved
Hide resolved
const type = localInferenceFromInitializer(member, member.type); | ||
if (!type) { | ||
const { method, flags } = handleMethodDeclaration(member, member.name, NarrowBehavior.None); | ||
if (flags === LocalTypeInfoFlags.Invalid) { |
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.
Could you please test with &
for the invalid flag. Currently there is only one flag (used to be more) but I would like to keep the idea of this being a flag enum at least for now.
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.
Done
1. use bitwise AND instead of comparison 2. report errors on property name for object literals instead of the object literal Signed-off-by: Hana Joo <hanajoo@google.com>
e878ebd
into
bloomberg:isolated-declarations
Except for the commit e9ca3d4 everything else is non-functional, all others are fixing tests and moving things around, formatting.