Skip to content

Fixed two problems with annotated types in patterns #70

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

Merged
merged 1 commit into from
Mar 14, 2014

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 14, 2014

Problem 1: The parser did not accept them. It has to accept a "RefinedType" as an ascription,
not a "WithType" (as it did before), or even a "SimpleType" (as speced in the SyntaxSummary).

Problem 2: Annotations are always typed as expressions. The annotations in question were typed
as patterns before.

Tests in Patterns.scala and in the Dotty compiler itself.

Problem 1: The parser did not accept them. It has to accept a "RefinedType" as an ascription,
not a "WithType" (as it did before), or even a "SimpleType" (as speced in the SyntaxSummary).

Problem 2: Annotations are always typed as expressions. The annotations in question were typed
as patterns before.

Tests in Patterns.scala and in the Dotty compiler itself.
@odersky
Copy link
Contributor Author

odersky commented Mar 14, 2014

Review by @retronym @gzm0

@odersky
Copy link
Contributor Author

odersky commented Mar 14, 2014

This subsumes pull request #66 by @retronym

@gzm0
Copy link
Contributor

gzm0 commented Mar 14, 2014

LGTM

@retronym
Copy link
Member

LGTM, too

odersky added a commit that referenced this pull request Mar 14, 2014
Fixed two problems with annotated types in patterns
@odersky odersky merged commit 8be53e7 into scala:master Mar 14, 2014
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

Successfully merging this pull request may close these issues.

3 participants