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
Inexplicitly outer in 2ry ctor #7274
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7274?orig=1
|
@som-snytt said: class C {
var i = 0
def this(j: Int) = {
this()
new AnyRef() {
i = j
}
}
} |
Som's example still crashes in 2.13.0-M3 |
There were a couple of fixes in constructors and this works now. Thanks to Lukas. Wait, what about Dotty? Is it fixed in Dotty? Yes, it is. |
(Milestoned 2.13.8, but perhaps the actual fix came in some earlier 2.13.x version.) |
The fix fix was 2.13.4 scala/scala#9226 The previous fix and regression was 2.13.0 and 2.13.3. This is the one they called "embarrassingly simple to reproduce" and "actually two bugs, one was fixed and the other was backported." The fix fix was backported in 2.12.13. |
Description Resource Path Location Type
Error in Scala compiler: while compiling: /home/jmv/src/scala_learn/src/CopyofInferenceSwingWorker.scala during phase: global=explicitouter, atPhase=erasure library version: version 2.10.1 compiler version: version 2.10.1 reconstructed args: -Xpluginsdir /home/jmv/apps/eclipse4/configuration/org.eclipse.osgi/bundles/737/1/.cp/lib -deprecation -classpath /home/jmv/apps/jdk1.7.0_17/jre/lib/resources.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/rt.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/jsse.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/jce.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/charsets.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/jfr.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/ext/sunjce_provider.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/ext/zipfs.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/ext/sunec.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/ext/localedata.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/ext/sunpkcs11.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/ext/dnsns.jar:/home/jmv/src/scala_learn/bin:/home/jmv/apps/eclipse4/configuration/org.eclipse.osgi/bundles/738/1/.cp/lib/scala-swing.jar:/home/jmv/apps/eclipse4/configuration/org.eclipse.osgi/bundles/738/1/.cp/lib/scala-actors.jar:/home/jmv/apps/eclipse4/configuration/org.eclipse.osgi/bundles/737/1/.cp/lib/scala-reflect.jar -explaintypes -g:notailcalls -bootclasspath /home/jmv/apps/jdk1.7.0_17/jre/lib/resources.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/rt.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/sunrsasign.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/jsse.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/jce.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/charsets.jar:/home/jmv/apps/jdk1.7.0_17/jre/lib/jfr.jar:/home/jmv/apps/jdk1.7.0_17/jre/classes:/home/jmv/apps/eclipse4/configuration/org.eclipse.osgi/bundles/738/1/.cp/lib/scala-library.jar -unchecked last tree to typer: Literal(Constant(())) symbol: null symbol definition: null tpe: Unit symbol owners: context owners: value evt -> method propertyChange -> anonymous class $anon -> constructor InferenceSwingWorker2 -> class InferenceSwingWorker2 -> package inference == Enclosing template or block == DefDef( // def propertyChange(evt: java.beans.PropertyChangeEvent): Unit "propertyChange" [] // 1 parameter list ValDef( // evt: java.beans.PropertyChangeEvent "evt" // tree.tpe=java.beans.PropertyChangeEvent ) // tree.tpe=Unit Apply( // def setProgress(progress: Int): Unit in class InferenceProgressFrame, tree.tpe=Unit InferenceSwingWorker2.this.eulergui$gui$inference$InferenceSwingWorker2$$frame()."setProgress" // def setProgress(progress: Int): Unit in class InferenceProgressFrame, tree.tpe=(progress: Int)Unit 11 ) ) == Expanded type of tree == TypeRef(TypeSymbol(final abstract class Unit extends AnyVal)) no-symbol does not have an owner scala_learn Unknown Scala Problem
The text was updated successfully, but these errors were encountered: