Selaa lähdekoodia

[php7] added "object" to keywords list (#6838)

Alexander Kuzmenko 7 vuotta sitten
vanhempi
commit
a4f94a136e
3 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. 6 0
      extra/CHANGES.txt
  2. 1 1
      src/generators/genphp7.ml
  3. 1 1
      std/php7/Boot.hx

+ 6 - 0
extra/CHANGES.txt

@@ -1,3 +1,9 @@
+2018-XX-XX: 3.4.6
+
+	Bugfixes:
+
+	php7 : fixed an issue with "Object" used as a class name for PHP 7.2 (it's a new keyword in php) (#6838)
+
 2018-01-31: 3.4.5
 
 	General improvements and optimizations:

+ 1 - 1
src/generators/genphp7.ml

@@ -140,7 +140,7 @@ let is_keyword str =
 		| "print" | "private" | "protected" | "public" | "require" | "require_once" | "return" | "static" | "switch"
 		| "throw" | "trait" | "try" | "unset" | "use" | "var" | "while" | "xor" | "yield" | "__class__" | "__dir__"
 		| "__file__" | "__function__" | "__line__" | "__method__" | "__trait__" | "__namespace__" | "int" | "float"
-		| "bool" | "string" | "true" | "false" | "null" | "parent" | "void" | "iterable"
+		| "bool" | "string" | "true" | "false" | "null" | "parent" | "void" | "iterable" | "object"
 			-> true
 		| _ -> false
 

+ 1 - 1
std/php7/Boot.hx

@@ -245,7 +245,7 @@ class Boot {
 					| "print" | "private" | "protected" | "public" | "require" | "require_once" | "return" | "static" | "switch"
 					| "throw" | "trait" | "try" | "unset" | "use" | "var" | "while" | "xor" | "yield" | "__class__" | "__dir__"
 					| "__file__" | "__function__" | "__line__" | "__method__" | "__trait__" | "__namespace__" | "int" | "float"
-					| "bool" | "string" | "true" | "false" | "null" | "parent" | "void" | "iterable":
+					| "bool" | "string" | "true" | "false" | "null" | "parent" | "void" | "iterable" | "object":
 						part += '_hx';
 				case _:
 			}