We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69b9fcf commit 643c616Copy full SHA for 643c616
compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -862,7 +862,9 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
862
}
863
864
865
- /** Extractor for not-null assertions */
+ /** Extractor for not-null assertions.
866
+ * A not-null assertion for reference `x` has the form `x.$asInstanceOf$[x.type & T]`.
867
+ */
868
object AssertNotNull with
869
def apply(tree: tpd.Tree, tpnn: Type)(given Context): tpd.Tree =
870
tree.select(defn.Any_typeCast).appliedToType(AndType(tree.tpe, tpnn))
0 commit comments