HaxeFoundation / HaxeFoundation/haxe

[nullsafety] indirect null checks

Open
#8,675 2 comments 0 reactions 1 assignee Claimed by @RealyUniqueName View on GitHub
bug feature-null-safety
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

It seems like the following should compile:

```haxe
@:nullSafety
class Main {
static var foo:Null;

static function main() {
var hasFoo = foo != null;
if (hasFoo) {
foo.charAt(0);
}
}
}
```

```
source/Main.hx:8: characters 4-14 : Null safety: Cannot access "charAt" of a nullable value.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.