RblSb 4 months ago
parent
commit
699392f492
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tests/nullsafety/src/cases/TestLoose.hx

+ 8 - 0
tests/nullsafety/src/cases/TestLoose.hx

@@ -146,6 +146,14 @@ class TestLoose {
 		shouldFail(if (foo()) {});
 		shouldFail(if (foo()) {});
 	}
 	}
 
 
+	static function return_localFuncNullableAccess_shouldPass():Void {
+		if (staticVar == null) return;
+		function foo() {
+			trace(staticVar.length);
+		}
+		foo();
+	}
+
 	static function nullCoal_continue_shouldPass():Void {
 	static function nullCoal_continue_shouldPass():Void {
 		for (i in 0...1) {
 		for (i in 0...1) {
 			var i:String = staticVar ?? continue;
 			var i:String = staticVar ?? continue;