Skip to content

Commit

Permalink
We don't support returning objects yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdtscp committed Aug 18, 2020
1 parent f71cd97 commit 137bb3b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/tests/Test_CodeGeneration/NamespacedFunctions/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ class Class {
~Class() {}
};

Class getClass(const int val) {
// TODO: Return the `Class` object.
int getClass(const int val) {
Class output(val);
return output;
return output.m_val;
}

} // namespace Namespace

Namespace::Class getClass(const int val) { return Namespace::getClass(val); }
// TODO: Use this function.
int getClass(const int val) { return Namespace::getClass(val); }

int main(int argc, char **argv) {
Namespace::Class obj = Namespace::getClass(5);
Expand Down

0 comments on commit 137bb3b

Please sign in to comment.