Skip to content

Update comments on ParamForwarding and SuperAccessors. #506

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

Merged
merged 2 commits into from
Apr 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/dotty/tools/dotc/Run.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import reporting.Reporter
import transform.TreeChecker
import java.io.{BufferedWriter, OutputStreamWriter}
import scala.reflect.io.VirtualFile
import scala.util.control.NonFatal

class Run(comp: Compiler)(implicit ctx: Context) {

Expand All @@ -27,9 +28,13 @@ class Run(comp: Compiler)(implicit ctx: Context) {
}
}

def compile(fileNames: List[String]): Unit = {
def compile(fileNames: List[String]): Unit = try {
val sources = fileNames map getSource
compileSources(sources)
} catch {
case NonFatal(ex) =>
println(s"exception occurred while compiling $units%, %")
throw ex
}

/** TODO: There's a fundamental design problem here: We assmble phases using `squash`
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/transform/ParamForwarding.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Contexts._, Types._, Symbols._, Flags._, TypeUtils._, DenotTransformers._
*
* if
* (1) x is forwarded in the supercall to a parameter that's also named `x`
* (2) the superclass parameter accessor for `x` is accessible from the current class to
* (2) the superclass parameter accessor for `x` is accessible from the current class
* change the accessor to
*
* def x: T = super.x.asInstanceOf[T]
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/transform/SuperAccessors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
* of adding accessors. For instance, super calls from these regions
* always have to go through an accessor.
*
* The `invalidOwner` field, if different from NoSymbol,
* The `invalidEnclClass` field, if different from NoSymbol,
* contains the symbol that is not a valid owner.
*/
private var invalidEnclClass: Symbol = NoSymbol
Expand Down