Skip to content

Special case pattern matching against abstract types with class tags #1111

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 12 commits into from
Mar 2, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 19, 2016

Fixes #1099. Review by @DarkDimius

@odersky
Copy link
Contributor Author

odersky commented Feb 19, 2016

Based on #1105.

Tests failures were caused by previous incomplete implementation
of classTag.
Now diagnoses missing ClassTags of abstract types
as implicit failures.

Also: Simpler API of tpd.clsOf.
If a classtag for `T` is available, a classtag
for `Array[T]` can also be generated.
Context bounds did not make it before into secondary
constructors. Now the evidence parameters generated
by context bounds get copied into secondary constructors.

Without this fix, scala.collection.immutable.PagedSeq fails
to compile in new classtag scheme.
Make use of Definitions as the repository for
standard symbols in Predef.
Now subsumed by functionality in Typer.
Goal: Make implementation easier to understand. Prepare the ground for
special-casing of typetagged patterns.
Add special case when pattern matching against an abstract type that comes with a class tag
We do not want to do implicit search during tree checking.
@odersky
Copy link
Contributor Author

odersky commented Feb 20, 2016

Rebased to master

@DarkDimius
Copy link
Contributor

LGTM

DarkDimius added a commit that referenced this pull request Mar 2, 2016
Special case pattern matching against abstract types with class tags
@DarkDimius DarkDimius merged commit ae62466 into scala:master Mar 2, 2016
@allanrenucci allanrenucci deleted the fix-#1099 branch December 14, 2017 16:59
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