فهرست منبع

php: fixed issue #1048

Franco Ponticelli 12 سال پیش
والد
کامیت
6d66f3755a
2فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 4 2
      genphp.ml
  2. 1 1
      tests/unit/TestPhp.hx

+ 4 - 2
genphp.ml

@@ -773,8 +773,10 @@ and gen_member_access ctx isvar e s =
 	match follow e.etype with
 	| TAnon a ->
 		(match !(a.a_status) with
-		| EnumStatics _
-		| Statics _ -> print ctx "::%s%s" (if isvar then "$" else "") (s_ident s)
+		| EnumStatics _ ->
+			print ctx "::%s%s" (if isvar then "$" else "") s
+		| Statics _ ->
+			print ctx "::%s%s" (if isvar then "$" else "") (s_ident s)
 		| _ -> print ctx "->%s" (s_ident_field s))
 	| _ -> print ctx "->%s" (s_ident_field s)
 

+ 1 - 1
tests/unit/TestPhp.hx

@@ -4,7 +4,7 @@ class TestPhp extends Test
 {
 	function testAbstractEnum()
 	{
-		trace(Abstract);
+		eq(Abstract.getName(), "Abstract");
 	}
 }