HaxeFoundation / HaxeFoundation/haxe
@:structInit vs new optional var syntax
Open
feature-structInit
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
@:structInit
class Person {
var ?name:String;
}
```
```
src/Main.hx:3: characters 7-11 : ?var syntax is only allowed in structures
```
I think `@:structInit` classes also support the notion of `@:optional` fields, so the new syntax should be supported too?
Contributor guide
Assessment
This issue has not been assessed yet.