Skip to content

Commit e073cd7

Browse files
timholystaticfloat
authored andcommitted
Update the AST docs on nothing :method expressions (#38496)
Fixes #38451 (cherry picked from commit d0478ca)
1 parent 3a625c5 commit e073cd7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/src/devdocs/ast.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,10 @@ These symbols appear in the `head` field of [`Expr`](@ref)s in lowered form.
341341

342342
* `args[1]`
343343

344-
A function name, or `false` if unknown. If a symbol, then the expression first
345-
behaves like the 1-argument form above. This argument is ignored from then on. When
346-
this is `false`, it means a method is being added strictly by type, `(::T)(x) = x`.
344+
A function name, or `nothing` if unknown or unneeded. If a symbol, then the expression
345+
first behaves like the 1-argument form above. This argument is ignored from then on.
346+
It can be `nothing` when methods are added strictly by type, `(::T)(x) = x`,
347+
or when a method is being added to an existing function, `MyModule.f(x) = x`.
347348

348349
* `args[2]`
349350

0 commit comments

Comments
 (0)