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

Reflection API: Type.typeSymbol dealiases the underlying symbol #6474

Closed
scabug opened this issue Oct 4, 2012 · 5 comments
Closed

Reflection API: Type.typeSymbol dealiases the underlying symbol #6474

scabug opened this issue Oct 4, 2012 · 5 comments
Milestone

Comments

@scabug
Copy link

scabug commented Oct 4, 2012

scala> showRaw(typeOf[String])
res0: String = TypeRef(SingleType(ThisType(scala), scala.Predef), newTypeName("String"), List())

scala> typeOf[String].typeSymbol
res1: reflect.runtime.universe.Symbol = class String

scala> typeOf[String].typeSymbol.asType.isAliasType
res2: Boolean = false

scala> val TypeRef(_, sym, _) = typeOf[String]
sym: reflect.runtime.universe.Symbol = type String

scala> sym.asType.isAliasType
res3: Boolean = true
@scabug
Copy link
Author

scabug commented Oct 4, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6474?orig=1
Reporter: @xeno-by

@scabug
Copy link
Author

scabug commented Oct 4, 2012

@paulp said:
What makes you open this as a bug? This is by design. You can't change it, that's for sure. The non-dealiasing method (in the compiler) is typeSymbolDirect.

@scabug
Copy link
Author

scabug commented Oct 4, 2012

@xeno-by said:
Yeah I know about typeSymbolDirect. Wanted to start a discussion about the matter to find out the reasons why typeSymbol dealiases stuff. If that can't be changed, maybe it'd be a good idea to expose typeSymbolDirect in the API in point one.

@scabug scabug added this to the Backlog milestone Apr 7, 2017
@SethTisue
Copy link
Member

probably out of scope at this point and maybe we should just close it?

@som-snytt
Copy link

som-snytt commented Jul 12, 2023

Wanted to start a discussion about the matter

Today we have more civilized ways of discussing these matters. Not to say dignified.

By coincidence, I noticed this behavior on a recent PR.

Also, "decennium vetus tempus est." Of the ticket, we say, "veteris panis est."

@som-snytt som-snytt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants