Add Javascript (JSC) support for type conversion

Fix types_directive testcase to ensure the %types code is actually
called and not just cast from one type to the other.
This commit is contained in:
William S Fulton 2021-03-11 20:16:38 +00:00
commit 6aef217438
3 changed files with 17 additions and 17 deletions

View file

@ -19,10 +19,11 @@ struct Date {
};
struct Time1 {
Time1(unsigned int year, unsigned int month, unsigned int day, unsigned int seconds) : date(year, month, day), seconds(seconds) {}
Time1(unsigned int year, unsigned int month, unsigned int day, unsigned int seconds) : padding(), date(year, month, day), seconds(seconds) {}
Date &dateFromTime() {
return date;
}
unsigned int padding; // so that memory layout is not the same as Date
Date date;
unsigned int seconds;
};