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

Fix #7554: Add TypeTest for sound pattern type test #7555

Open
wants to merge 7 commits into
base: master
from

Conversation

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Nov 14, 2019

No description provided.

library/src/scala/tasty/TypeTest.scala Outdated Show resolved Hide resolved
library/src/scala/tasty/TypeTest.scala Outdated Show resolved Hide resolved
@nicolasstucki nicolasstucki force-pushed the dotty-staging:fix-#7554 branch from 516ca89 to 8a8d8ec Nov 14, 2019
@nicolasstucki nicolasstucki force-pushed the dotty-staging:fix-#7554 branch 2 times, most recently from 8a871a3 to 6a52c40 Nov 14, 2019
@nicolasstucki nicolasstucki force-pushed the dotty-staging:fix-#7554 branch from 6a52c40 to d962d0b Nov 15, 2019
docs/docs/reference/other-new-features/type-test.md Outdated Show resolved Hide resolved
docs/docs/reference/other-new-features/type-test.md Outdated Show resolved Hide resolved
library/src/scala/reflect/TypeTest.scala Outdated Show resolved Hide resolved
library/src/scala/reflect/TypeTest.scala Outdated Show resolved Hide resolved
library/src/scala/reflect/TypeTest.scala Outdated Show resolved Hide resolved
library/src/scala/reflect/TypeTest.scala Outdated Show resolved Hide resolved
library/src/scala/reflect/TypeTest.scala Show resolved Hide resolved
Copy link
Contributor

odersky left a comment

I strongly maintain that we should use ClassTag for this and not TypeTest. Let's fix/generalize broken abstractions instead of inventing new ones. That's the only way to keep complexity down.

@sjrd

This comment has been minimized.

Copy link
Member

sjrd commented Nov 23, 2019

And I strongly maintain that ClassTags are not broken, and that it was type tests bolted on them that were broken since the beginning. Let's not fix what ain't broken, and let's put in two unrelated interfaces the two completely unrelated capabilities, namely that of creating Array[A]s and that of testing x.isInstanceOf[A]. Maintaining unrelated responsibilities in different interfaces is the only way to keep complexity down.

@nicolasstucki nicolasstucki marked this pull request as ready for review Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.