-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admit parametric aliases of classes in parent typing
When typing parent types as constructors with implicitly added `()` arguments, also admit alias types that become classes after eta-collapsing. Fixes #18623
- Loading branch information
Showing
10 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
final abstract class ForcedRecompilationToken[T] | ||
object ForcedRecompilationToken { | ||
implicit def default: ForcedRecompilationToken["abc"] = null | ||
} | ||
|
||
class GoodNoParens[T](implicit ev: ForcedRecompilationToken[T]) | ||
type BadNoParens[T] = GoodNoParens[T] | ||
|
||
// error | ||
object A extends BadNoParens | ||
|
||
// ok | ||
object B extends BadNoParens() | ||
object C extends GoodNoParens | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
final abstract class ForcedRecompilationToken[T] | ||
object ForcedRecompilationToken { | ||
implicit def default: ForcedRecompilationToken["abc"] = null | ||
} | ||
|
||
object x { | ||
class GoodNoParens[T](implicit ev: ForcedRecompilationToken[T]) | ||
} | ||
export x.GoodNoParens as BadNoParens | ||
|
||
// error | ||
object A extends BadNoParens | ||
|
||
// ok | ||
object B extends BadNoParens() | ||
object C extends x.GoodNoParens | ||
|
||
object App extends App { | ||
println("compiled") | ||
} |