|
@@ -88,9 +88,11 @@ private abstract NullCoalAbstractResolve(NullCoalAbstractData) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+var screamOutput:String = null;
|
|
|
|
|
+
|
|
|
abstract Message(String) from String {
|
|
abstract Message(String) from String {
|
|
|
public function scream()
|
|
public function scream()
|
|
|
- trace(this.toUpperCase());
|
|
|
|
|
|
|
+ screamOutput = this.toUpperCase();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@:nullSafety(StrictThreaded)
|
|
@:nullSafety(StrictThreaded)
|
|
@@ -338,6 +340,7 @@ class TestNullCoalescing extends Test {
|
|
|
|
|
|
|
|
var m:Message = "foo";
|
|
var m:Message = "foo";
|
|
|
(m ??= "bar").scream();
|
|
(m ??= "bar").scream();
|
|
|
|
|
+ eq("FOO", screamOutput);
|
|
|
eq("unit.Message", HelperMacros.typeString(m ??= "bar"));
|
|
eq("unit.Message", HelperMacros.typeString(m ??= "bar"));
|
|
|
eq("foo", '$m');
|
|
eq("foo", '$m');
|
|
|
|
|
|