Skip to content

Commit 243bfbb

Browse files
committed
chore!: rename dict:contains to dict:contains\? for consistency with the other functions returning booleans
1 parent ac97f90 commit 243bfbb

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.envrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/usr/bin/env bash
22

3-
export PATH="$(pwd)/tools:$PATH"
3+
export ARKSCRIPT_PATH="$(pwd)/lib"
4+
export PATH="$(pwd)/tools:$(pwd)/cmake-build-debug:$PATH"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Changed
88
- the formatter properly formats dictionaries (key-value pairs on their own line, always)
9+
- renamed `dict:contains` to `dict:contains?` so that all functions returning booleans have `?` suffix ; added temporary alias `dict:contains`
910

1011
### Removed
1112

src/arkreactor/Builtins/Dict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace Ark::internal::Builtins::Dict
6363
{
6464
if (!types::check(n, ValueType::Dict, ValueType::Any))
6565
throw types::TypeCheckingError(
66-
"dict:contains",
66+
"dict:contains?",
6767
{ { types::Contract { { types::Typedef("dictionary", ValueType::Dict),
6868
types::Typedef("key", ValueType::Any) } } } },
6969
n);

tests/unittests/resources/DiagnosticsSuite/typeChecking/dict_contains_num.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Function dict:contains expected 2 arguments but got 1
1+
Function dict:contains? expected 2 arguments but got 1
22
-> dictionary (Dict) was of type Number
33
-> key (any) was not provided
44

0 commit comments

Comments
 (0)