Skip to content

Commit 643c616

Browse files
committed
Add suggested doc comment
1 parent 69b9fcf commit 643c616

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,9 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
862862
}
863863
}
864864

865-
/** Extractor for not-null assertions */
865+
/** Extractor for not-null assertions.
866+
* A not-null assertion for reference `x` has the form `x.$asInstanceOf$[x.type & T]`.
867+
*/
866868
object AssertNotNull with
867869
def apply(tree: tpd.Tree, tpnn: Type)(given Context): tpd.Tree =
868870
tree.select(defn.Any_typeCast).appliedToType(AndType(tree.tpe, tpnn))

0 commit comments

Comments
 (0)