HaxeFoundation / HaxeFoundation/haxe
Array type inference with local function
Open
bug
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Seems pretty minor, but maybe report is useful (Haxe nightly)
```haxe
class Point {
public function new() {}
public var x = 0;
public var y = 0;
}
class Main {
static function main() {
final points = [];
function foo() points[0].y = 1;
points[0] = new Point();
points[0].x = 1; // { y : Int } has no field x
foo();
}
}
```
Same result with field and function before main:
```haxe
static final points = [];
static function foo() points[0].y = 1;
static function main() {...
```
Contributor guide
Assessment
This issue has not been assessed yet.