-
Notifications
You must be signed in to change notification settings - Fork 21
"illegal cyclic reference involving class Array" compiling new Array(0)
under -no-specialization
#7481
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-7481?orig=1 |
@retronym said (edited on May 15, 2013 10:28:12 AM UTC):
|
@gkossakowski said: |
@retronym said: |
@retronym said: private def updateTypeCache() {
if (tpeCache eq NoType)
throw CyclicReference(this, typeConstructor)
if (isInitialized)
tpePeriod = currentPeriod
tpeCache = NoType // cycle marker
val noTypeParams = phase.erasedTypes && this != ArrayClass || unsafeTypeParams.isEmpty
tpeCache = newTypeRef(
if (noTypeParams) Nil
else unsafeTypeParams map (_.typeConstructor)
)
// Avoid carrying around different types in tyconCache and tpeCache
// for monomorphic types.
if (noTypeParams && tyconCacheNeedsUpdate)
setTyconCache(tpeCache)
} |
@retronym said: We could either adjust this to skip pack to /** The logic approximately boils down to finding the most recent phase
* which immediately follows any of parser, namer, typer, or erasure.
* In effect that means this will return one of:
*
* - packageobjects (follows namer)
* - superaccessors (follows typer)
* - posterasure (follows erasure)
* - null
*/
private def unsafeTypeParamPhase = {
var ph = phase
while (ph.prev.keepsTypeParams)
ph = ph.prev
ph
} and/or hard-code the specialization info transformer to be a no-op for Array. |
See also:
The text was updated successfully, but these errors were encountered: