1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: only allow != and == for enum (#7985)

This commit is contained in:
Swastik Baranwal
2021-01-10 15:56:31 +05:30
committed by GitHub
parent 1f5255c2bb
commit 0081e5740d
7 changed files with 34 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
- Smart cast in for loops: `for mut x is string {}`.
- `[noinit]` struct attribute to disallow direct struct initialization with `Foo{}`.
- Array decompose: `[1, 2, 3]...` is now `...[1, 2, 3]`
- Treating `enum` as `int` is removed for strict type checking.
- Treating `enum` as `int` and operations on `enum` except `==` and `!=` are removed for strict type checking.
- Support `[manualfree] fn f1(){}` and `[manualfree] module m1`, for functions doing their own memory management.
## V 0.2.1