Skip to content

Commit c299da9

Browse files
committed
Address review comments
1 parent ee265a6 commit c299da9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,20 @@ object Typer {
6262
if (!tree.isEmpty && !tree.isInstanceOf[untpd.TypedSplice] && ctx.typerState.isGlobalCommittable)
6363
assert(tree.pos.exists, s"position not set for $tree # ${tree.uniqueId}")
6464

65+
/** A context property that indicates the owner of any expressions to be typed in the context
66+
* if that owner is different from the context's owner. Typically, a context with a class
67+
* as owner would have a local dummy as ExprOwner value.
68+
*/
6569
private val ExprOwner = new Property.Key[Symbol]
70+
71+
/** An attachment on a Select node with an `apply` field indicating that the `apply`
72+
* was inserted by the Typer.
73+
*/
6674
private val InsertedApply = new Property.Key[Unit]
75+
76+
/** An attachment on a tree `t` occurring as part of a `t()` where
77+
* the `()` was dropped by the Typer.
78+
*/
6779
private val DroppedEmptyArgs = new Property.Key[Unit]
6880
}
6981

tests/neg/i3012/a.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
object a extends fuz.Fuzbar {
33
override def str = ""
44
str()()()()()() // error: missing argument
5+
str()() // error: missing argument
6+
str() // ok
7+
str // ok
58
}

0 commit comments

Comments
 (0)