HaxeFoundation / HaxeFoundation/haxe

[nullsafety] variable capture + type check

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

Description

The following doesn't compile with the type-check:
```haxe
@:nullSafety
class Test {
static function main() {
switch (null:Null) {
case null:
case (_:String) => v:
}
}
}
```
```
Test.hx:6: characters 9-19 : Null safety: Cannot cast nullable value to not nullable type.
```

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.