Update painless-syntax.asciidoc

Fix asciidoc syntax
This commit is contained in:
Clinton Gormley 2016-12-19 10:08:58 +01:00
parent 655a95a2bb
commit f96769f97b
1 changed files with 2 additions and 2 deletions

View File

@ -185,9 +185,9 @@ doesn't have a `foo.keyword` field but is the length of that field if it does.
Lastly, `?:` is lazy so the right hand side is not evaluated at all if the left
hand side isn't null.
NOTE: Unlike Groovy, Painless' `?:` operator only coalesces `null`, not `false`
NOTE: Unlike Groovy, Painless' ++?:++ operator only coalesces `null`, not `false`
or http://groovy-lang.org/semantics.html#Groovy-Truth[falsy] values. Strictly
speaking Painless' `?:` is more like Kotlin's `?:` than Groovy's `?:`.
speaking Painless' ++?:++ is more like Kotlin's ++?:++ than Groovy's ++?:++.
NOTE: The result of `?.` and `?:` can't be assigned to primitives. So
`int[] someArray = null; int l = someArray?.length` and