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
NPE in when completing default getters #6576
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6576?orig=1 |
@dragos said (edited on Oct 28, 2012 2:49:02 PM UTC): @throws(classOf[IndexOutOfBoundsException])
override def productElement(n: Int) = n match {
.. and class throws[T <: Throwable](cause: String = "") extends scala.annotation.StaticAnnotation { |
@lrytz said: |
@dragos said: |
@lrytz said: |
@dragos said: |
@dragos said: |
@paulp said: |
@dragos said: |
@adriaanm said: (when switching branches, apparently) eclipse.buildId=I20110613-1736
java.version=1.6.0_37
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -clean -data /Users/patrik/workspace-akka
Error
Wed Feb 13 13:43:24 CET 2013
Error during askOption
java.lang.NullPointerException
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$addDefaultGetters$2$$anonfun$apply$15.apply(Namers.scala:1274)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$addDefaultGetters$2.apply(Namers.scala:1207)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$addDefaultGetters$2.apply(Namers.scala:1204) |
@adriaanm said: |
@lrytz said: |
Patrik Nordwall (patriknw) said: |
@dragos said:
I couldn't reproduce this (yet) in a controlled environment, but I will try again. |
@huitseeker said: |
@retronym said: |
@dragos said: class HippyAnnotation[T <: Throwable](cause: String = "") extends scala.annotation.StaticAnnotation {
def this(clazz: Class[T]) = this()
} It all boils down to this code in Namers.scala: // if default getters (for constructor defaults) need to be added to that module, here's the namer
// to use. clazz is the ModuleClass. sourceModule works also for classes defined in methods.
val module = clazz.sourceModule
for (cda <- module.attachments.get[ConstructorDefaultsAttachment]) {
cda.companionModuleClassNamer = templateNamer
} The |
@retronym said: |
@dragos said: class HippyClass(cause: String = "") |
@retronym said (edited on Feb 19, 2013 5:24:49 PM UTC): |
@huitseeker said (edited on Dec 10, 2013 2:18:38 PM UTC): |
I get the following exception in the IDE when opening certain files. I couldn't nail it down to a specific file yet, but git archeology suggests an existing workaround was removed with the belief that the NPE can't happen anymore:
The text was updated successfully, but these errors were encountered: