summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-11-08 18:00:17 +0100
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-11-08 18:00:17 +0100
commit98f6d9551beefbecd5d93a31ec8b553fee3e1f4c (patch)
tree03460ace5dcbe4987966cf3c06c244106a898ce7 /modules
parent23b7ffd8c6fde68170e8f6104d8bf40c6ef8da72 (diff)
Fixed wrong Schema Type being provided
Diffstat (limited to 'modules')
-rw-r--r--modules/codec-json/tests/codec-json.cpp1
-rw-r--r--modules/codec/c++/data.hpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/codec-json/tests/codec-json.cpp b/modules/codec-json/tests/codec-json.cpp
index 95b0d40..a181dc0 100644
--- a/modules/codec-json/tests/codec-json.cpp
+++ b/modules/codec-json/tests/codec-json.cpp
@@ -375,6 +375,7 @@ SAW_TEST("Array Struct read and write"){
SAW_TEST("Struct Array Struct read and write"){
using namespace saw;
data<schema::TestStructArrayStruct, encode::Native> native;
+
native.template get<"banana">() = {4u};
data<schema::TestStructArrayStruct, encode::Json> json;
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp
index 8e29d3c..26f3afd 100644
--- a/modules/codec/c++/data.hpp
+++ b/modules/codec/c++/data.hpp
@@ -608,7 +608,7 @@ public:
return make_void();
}
- error_or<ptr<data<Value,encode::Native>>> find(ref<data<Value,encode::Native>> key){
+ error_or<ptr<data<Value,encode::Native>>> find(ref<data<Key,encode::Native>> key){
auto find = vals_.find(key());
if(find == vals_.end()){
return make_error<err::not_found>();