com php-langspec: Mark instanceof as left-associative: spec/10-expressions.md spec/19-grammar.md
[email protected] (Nikita Popov) Fri, 15 Mar 2019 08:54:22 +0000
| Newsgroups | php.standards.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 15aa45273f4e5533ed252a612a5e6e7349a4d3ec=0AAuthor: Nikita Pop= ov <[email protected]> Fri, 15 Mar 2019 09:54:22 +0100=0AParents= : 63d72a6df5d2c7b1b7a8aedde1410c780cfd92af=0ABranches: master=0A=0ALink:= http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3D15aa4527= 3f4e5533ed252a612a5e6e7349a4d3ec=0A=0ALog:=0AMark instanceof as left-associ= ative=0A=0AMay not have been originally intended this way, but it's how the= =0Alanguage works right now, so specify it as such (#226).=0A=0ABugs:=0Ahtt= ps://bugs.php.net/226=0A=0AChanged paths:=0A M spec/10-expressions.md=0A = M spec/19-grammar.md=0A=0A=0ADiff:=0Adiff --git a/spec/10-expressions.md = b/spec/10-expressions.md=0Aindex 988acaf..8c8af69 100644=0A--- a/spec/10-ex= pressions.md=0A+++ b/spec/10-expressions.md=0A@@ -1935,7 +1935,7 @@ instanc= eof-expression:=0A instanceof-subject 'instanceof' class-type-designator= =0A =0A instanceof-subject:=0A- unary-expression=0A+ instanceof-expressio= n=0A -->=0A =0A <pre>=0A@@ -1944,17 +1944,13 @@ instanceof-subject:=0A <= i><a href=3D"#grammar-instanceof-subject">instanceof-subject</a></i> inst= anceof <i><a href=3D"#grammar-class-type-designator">class-type-designato= r</a></i>=0A =0A <i id=3D"grammar-instanceof-subject">instanceof-subject:</= i>=0A- <i><a href=3D"#grammar-unary-expression">unary-expression</a></i>= =0A+ <i><a href=3D"#grammar-instanceof-expression">instanceof-expression<= /a></i>=0A </pre>=0A =0A-**Constraints**=0A-=0A-The *unary-expression* in *= instanceof-subject* must not be any form of literal.=0A-=0A **Semantics**= =0A =0A Operator `instanceof` returns `TRUE` if the value designated by=0A-= *unary-expression* in *instanceof-subject* is an object having the type spe= cified=0A+*instanceof-subject* is an object having the type specified=0A by= *class-type-designator*, is an object whose type is derived from that type= ,=0A or is an object whose type implements the interface specified by *clas= s-type-designator*.=0A Otherwise, it returns `FALSE`.=0Adiff --git a/spec/1= 9-grammar.md b/spec/19-grammar.md=0Aindex 6b66633..0cc4f68 100644=0A--- a/s= pec/19-grammar.md=0A+++ b/spec/19-grammar.md=0A@@ -563,7 +563,7 @@ The gram= mar notation is described in [Grammars section](09-lexical-structure.md#=0A= <i><a href=3D"#grammar-instanceof-subject">instanceof-subject</a></i> = instanceof <i><a href=3D"#grammar-class-type-designator">class-type-desi= gnator</a></i>=0A =0A <i id=3D"grammar-instanceof-subject">instanceof-subje= ct:</i>=0A- <i><a href=3D"#grammar-unary-expression">unary-expression</a>= </i>=0A+ <i><a href=3D"#grammar-instanceof-expression">instanceof-express= ion</a></i>=0A =0A <i id=3D"grammar-logical-NOT-expression">logical-NOT-exp= ression:</i>=0A <i><a href=3D"#grammar-instanceof-expression">instanceof= -expression</a></i>=0A