Skip to content

Commit

Permalink
refs #274: updated ChangeLog & spec test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kray-G committed Apr 15, 2021
1 parent c6f7f92 commit 16c2cb7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* #258: There is a case that the bytecode is not outputted.
* #267: Can't use a variable name using an upper case in debugger.
* #269: Object item is removed by flatten().
* #274: No error for multiple `const` declaration for the same variable.

## V1.0.0 (Official Release) - 2021/03/16
This is a 1st official release version.
Expand Down
23 changes: 23 additions & 0 deletions docs/spec/others/bugfixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,26 @@ System.println({ b: new B() }); // => {"a":"A"}
{"a":"A"}
{"b":"\\\"B\""}
```

### Example 8. Detects error for multi decl of 'const'

This bug's was caused by an incorrect bytecode.

* Issue: [#274](https://github.com/Kray-G/kinx/issues/274)
* Fixed: [c6f7f926f1790686fcb059605bc89ac24352663f](https://github.com/Kray-G/kinx/commit/c6f7f926f1790686fcb059605bc89ac24352663f)

#### Code

```javascript
const A = 1;
const A = 2;
A = 3;
System.println(A);
```

#### Result

```
Error: Symbol(A) has been already declared as 'const' near the <test.kx>:2
Error: Can not assign a value to the 'const' variable near the <test.kx>:3
```

0 comments on commit 16c2cb7

Please sign in to comment.