Skip to content

Conversation

@CyrusNajmabadi
Copy link
Contributor

Currently class expressions are not typechecked. We'll have to figure out how we want to appropriately design things there.

Parsing and emitting of class expressions themselves was not too hard. The most difficult part was changing things to support arbitrary expressions in the 'heritage' clause sections of a class. Parsing here was not bad. However, it did mean further parts of the typechecker and services layer needed to become aware of this new shape for the AST.

This type represents the expression+type arguments you can get in a class or interface
heritage clause section.  For class-implements clauses, or interface-extends clauses,
these expressions can only be identifiers or dotted names.  For class extends clauses,
these could be any expressions in the future.  However, for now, we only support identifiers
and dotted names.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can someone suggest a better name for this? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we mention that it can be identifiers\qualified names with optional type arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

CyrusNajmabadi added a commit that referenced this pull request Apr 1, 2015
Add support for parsing and emitting class expressions.
@CyrusNajmabadi CyrusNajmabadi merged commit 0245211 into master Apr 1, 2015
@CyrusNajmabadi CyrusNajmabadi deleted the classExpressions branch April 1, 2015 00:54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really do not like this name. why do we need it here? why can not we just have getTypeOfNode?

@ahejlsberg ahejlsberg mentioned this pull request Jun 19, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants