Fixed quite a few bugs, including makeing find template functions check for trait subset, not trait equality, and add the number required to the satisfied count. Based on what is now breaking, it looks like it's time to give the builtin functions types.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import io;
|
||||
import mem;
|
||||
import vector;
|
||||
|
||||
typedef Destructable {
|
||||
typedef AbleToBeDestroyed (Destructable) {
|
||||
void destruct() {
|
||||
println("Destroyed!");
|
||||
}
|
||||
@@ -9,19 +10,19 @@ typedef Destructable {
|
||||
|
||||
int main() {
|
||||
vector<int> intVec.construct(false);
|
||||
intVec.addBack(1);
|
||||
intVec.addBack(3);
|
||||
intVec.addBack(3);
|
||||
intVec.addBack(7);
|
||||
intVec.addEnd(1);
|
||||
intVec.addEnd(3);
|
||||
intVec.addEnd(3);
|
||||
intVec.addEnd(7);
|
||||
for (int i = 0; i < intVec.size(); i++;)
|
||||
print(intVec.at(i));
|
||||
|
||||
println();
|
||||
|
||||
vector<Destructable>* desVec = new<vector<Destructable>>()->construct(true);
|
||||
Destructable testDestruct;
|
||||
desVec->addBack(testDestruct);
|
||||
delete<vector<Destructable>>(desVec);
|
||||
vector<AbleToBeDestroyed>* desVec = new<vector<AbleToBeDestroyed>>()->construct(true);
|
||||
AbleToBeDestroyed testDestruct;
|
||||
desVec->addEnd(testDestruct);
|
||||
delete<vector<AbleToBeDestroyed>>(desVec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user