Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

empty instantiations of self types #4489

Open
CeylonMigrationBot opened this issue Jul 17, 2015 · 2 comments
Open

empty instantiations of self types #4489

CeylonMigrationBot opened this issue Jul 17, 2015 · 2 comments

Comments

@CeylonMigrationBot
Copy link

[@gavinking] We could add some reasoning around types like Comparable<Anything> which are empty due to the self type constraint. Perhaps just say that Nothing covers Comparable<Anything>, since I'm not sure if saying Comparable<Anything> is exactly Nothing would be decidable.

These case is distinguishable because:

  • the type parameter is a self type and is not covariant, and
  • the type argument does not inherit the type (and is not marked out).

[Migrated from ceylon/ceylon-spec#1383]

@CeylonMigrationBot
Copy link
Author

[@RossTate] Is this practical? If I recall, the analysis you ran a while ago showed that no one uses self types in ways that would be relevant to this optimization.

@CeylonMigrationBot
Copy link
Author

[@gavinking] Not sure if it's useful or not. But after looking at the code, there is no really obvious place to incorporate this reasoning without complicating the algorithms. So: not for 1.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants