|
@@ -289,6 +289,13 @@ class TestStrict {
|
|
|
shouldFail((true ? 'hello' : v).length);
|
|
shouldFail((true ? 'hello' : v).length);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ static function inlineCallWithNullArg_shouldFail() {
|
|
|
|
|
+ inline function check(value: Int): Int {
|
|
|
|
|
+ return value;
|
|
|
|
|
+ }
|
|
|
|
|
+ shouldFail(check((null : Null<Int>)));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
static function ternary_returnedFromInlinedFunction_shouldPass() {
|
|
static function ternary_returnedFromInlinedFunction_shouldPass() {
|
|
|
var str:String = inlinedNullableSafeString([null]);
|
|
var str:String = inlinedNullableSafeString([null]);
|
|
|
}
|
|
}
|
|
@@ -779,6 +786,12 @@ class TestStrict {
|
|
|
cb();
|
|
cb();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ inline function cb2() {
|
|
|
|
|
+ if(foo != null) {
|
|
|
|
|
+ trace(foo);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ cb2();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static public function closure_immediatelyExecuted_shouldInheritSafety(?s:String) {
|
|
static public function closure_immediatelyExecuted_shouldInheritSafety(?s:String) {
|
|
@@ -1068,4 +1081,4 @@ abstract NullFloat(Null<Float>) from Null<Float> to Null<Float> {
|
|
|
@:op(A + B) static inline function addOp1(lhs: NullFloat, rhs: Float): Float {
|
|
@:op(A + B) static inline function addOp1(lhs: NullFloat, rhs: Float): Float {
|
|
|
return lhs != null ? lhs.val() + rhs : rhs;
|
|
return lhs != null ? lhs.val() + rhs : rhs;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|