-
Notifications
You must be signed in to change notification settings - Fork 355
Closed
Description
I'm toying around with integrating ChaiScript into my Qt applications. When I have a function (in C++) that has Qt's quint64 data type which is just a unsigned long long int, ChaiScript::eval() will throw an error with the message "bad any cast." But if I try to access a method that returns a quint32/64, the result is just fine. e.g.:
void Class::yolo(quint64 i) {
cout << (i * i) << endl;
}
quint64 Class::swag() {
return 14;
}
//...
Class c;
chai.add(var(&c), "c");> c.yolo(20)
bad any cast
> print(c.swag())
14
Now let's saw I replace the parameter i's type with int, it works just fine and c.yolo(20) would return 400. Even replacing quint64 with unsigned long long int gives me the bad any cast.
Metadata
Metadata
Assignees
Labels
No labels