diff --git a/CHANGELOG.md b/CHANGELOG.md index fa689ce496..b1dc1efd06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ *Not yet released* - `vweb` now uses struct embedding: `app.vweb.text('hello') => app.text('hello')`. - Consts can now be declared outside of `const()` blocks: `const x = 0`. -- Allow overloading of `>`, `<`, `!=` and `==` operators. -- Add struct updating syntax: `Mystruct{ ...ms, name: 'new' }`. +- Overloading of `>`, `<`, `!=`, and `==` operators. +- New struct updating syntax: `User{ ...u, name: 'new' }` to replace `{ u | name: 'new' }`. +- `byte.str()` has been fixed and works like with all other numbers. `byte.ascii_str()` has been added. ## V 0.2.1 +*30 Dec 2020* - Hashmap bootstrapping fixes. - Array decomposition to varargs: `fn sum(i ...int) int` => `a := [2,3,4] println(sum(a...))` - HTML module docs generated by vdoc now have global search. diff --git a/vlib/builtin/byte_test.v b/vlib/builtin/byte_test.v index 1e37ae37b2..81e28037c6 100644 --- a/vlib/builtin/byte_test.v +++ b/vlib/builtin/byte_test.v @@ -5,8 +5,12 @@ fn test_clone() { assert b[0] == 0 assert b[1] == 1 assert b[2] == 2 - println(b[1].ascii_str()) + assert b[1].str() == '1' + xx := byte(35) + assert xx.str() == '35' + assert xx.ascii_str() == '#' println(typeof(`A`)) + assert typeof(`A`) == 'rune' x := rune(`A`) assert x.str() == 'A' assert typeof(x) == 'rune'