Skip to content

Commit cf7c245

Browse files
committed
Merge pull request #506 from dotty-staging/update-comments
Update comments on ParamForwarding and SuperAccessors.
2 parents a18b3fa + 1149634 commit cf7c245

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/dotty/tools/dotc/Run.scala

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import reporting.Reporter
1010
import transform.TreeChecker
1111
import java.io.{BufferedWriter, OutputStreamWriter}
1212
import scala.reflect.io.VirtualFile
13+
import scala.util.control.NonFatal
1314

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

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

30-
def compile(fileNames: List[String]): Unit = {
31+
def compile(fileNames: List[String]): Unit = try {
3132
val sources = fileNames map getSource
3233
compileSources(sources)
34+
} catch {
35+
case NonFatal(ex) =>
36+
println(s"exception occurred while compiling $units%, %")
37+
throw ex
3338
}
3439

3540
/** TODO: There's a fundamental design problem here: We assmble phases using `squash`

src/dotty/tools/dotc/transform/ParamForwarding.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Contexts._, Types._, Symbols._, Flags._, TypeUtils._, DenotTransformers._
1111
*
1212
* if
1313
* (1) x is forwarded in the supercall to a parameter that's also named `x`
14-
* (2) the superclass parameter accessor for `x` is accessible from the current class to
14+
* (2) the superclass parameter accessor for `x` is accessible from the current class
1515
* change the accessor to
1616
*
1717
* def x: T = super.x.asInstanceOf[T]

src/dotty/tools/dotc/transform/SuperAccessors.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
4848
* of adding accessors. For instance, super calls from these regions
4949
* always have to go through an accessor.
5050
*
51-
* The `invalidOwner` field, if different from NoSymbol,
51+
* The `invalidEnclClass` field, if different from NoSymbol,
5252
* contains the symbol that is not a valid owner.
5353
*/
5454
private var invalidEnclClass: Symbol = NoSymbol

0 commit comments

Comments
 (0)