Explorar o código

Merge branch 'development' of https://github.com/HaxeFoundation/haxe into development

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
7077a0f013
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      std/haxe/macro/Context.hx

+ 2 - 1
std/haxe/macro/Context.hx

@@ -168,7 +168,8 @@ class Context {
 		The default value is `"1"`.
 		The default value is `"1"`.
 	**/
 	**/
 	public static function definedValue( key : String ) : String {
 	public static function definedValue( key : String ) : String {
-		return new String(load("defined_value", 1)(untyped key.__s));
+		var d = load("defined_value", 1)(untyped key.__s);
+		return d == null ? null : new String(d);
 	}
 	}
 
 
 	/**
 	/**