-
Notifications
You must be signed in to change notification settings - Fork 21
support dependent argument types for constructor parameter lists (in the same way as for methods) #5712
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5712?orig=1 |
@adriaanm said (edited on Jul 26, 2012 9:37:36 AM UTC): def namerOf(sym: Symbol): Namer = {
val usePrimary = sym.isTerm && (
// (sym.isParamAccessor)
// ||
(sym.isParameter && sym.owner.isPrimaryConstructor)
)
if (usePrimary) createPrimaryConstructorParameterNamer
else innerNamer
} Here's a self-contained test case that also makes sure the constructor's type parameters stay in scope. class Global {
class Typer[T]
}
class Reifier[T](global: Global)(typer: global.Typer[T])
object Test {
def mkReifier[T](global: Global)(typer: global.Typer[T]) = typer
} |
@adriaanm said (edited on Jul 26, 2012 10:20:19 AM UTC): |
@gkossakowski said: |
Eduardo Pareja Tobes (eparejatobes) said: |
@adriaanm said: |
Eduardo Pareja Tobes (eparejatobes) said: something about the decreased priority and the unassigned state? |
@adriaanm said: |
Alexander Bulaev (alexbool) said: |
Andrei Pozolotin (andrei.pozolotin) said: |
Nathan M (nemccarthy) said: |
Owen Healy (ellbur) said: |
@manojo said: |
Ruben (lqbweb) said: |
@milessabin said (edited on Jun 20, 2016 5:28:08 PM UTC): |
Hamish Dickson (hamish.dickson-at-gmail.com) said: |
Another simple example which fails to compile in scalac, but compiles fine in dotty: trait Impl {
type Out
}
object Impl {
implicit def ev : Impl = new Impl {
type Out = Int
}
}
class Foo[T]
class Bar[T](implicit val impl: Impl) extends Foo[impl.Out] //ERROR= not found: value impl Workaround: use |
Cross-building against Scala 2.13 and Dotty would be greatly simplified if this was fixed for Scala 2.13. |
I hadn't realized this was still assigned to me. I agree it would be extremely helpful, but unfortunately I don't have time to work on it. |
Still DNC. Maybe Miles didn't have time to work on it. |
I didn't. |
The text was updated successfully, but these errors were encountered: