Skip to content
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 as operator and explicit signatures #2

Open
MaxDesiatov opened this issue May 31, 2019 · 0 comments
Open

Support as operator and explicit signatures #2

MaxDesiatov opened this issue May 31, 2019 · 0 comments
Assignees

Comments

@MaxDesiatov
Copy link
Owner

The simplest use case is support for Any subtyping, but we also need to support existential types in the future, such as

protocol P {}
extension Int: P {}
let x = 5 as P

After handling of as is implemented, we would be able to handle explicit signatures properly:

let x: P = 5

by internally converting this declaration to AST that's equivalent to let x = 5 as P.

@MaxDesiatov MaxDesiatov self-assigned this Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant