소스 검색

ObjectField.quotes is optional, so handle that in haxe.macro.Printer

Dan Korostelev 8 년 전
부모
커밋
13112d7623
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/haxe/macro/Printer.hx

+ 1 - 1
std/haxe/macro/Printer.hx

@@ -174,7 +174,7 @@ class Printer {
 
 	public function printObjectFieldKey(of:ObjectField) {
 		return switch (of.quotes) {
-			case Unquoted: of.field;
+			case null | Unquoted: of.field;
 			case Quoted: '"${of.field}"'; // TODO: Have to escape that?
 		}
 	}