Swapped pointers to the other side for types to prevent ambiguity, i.e. *int instead of int*
This commit is contained in:
@@ -10,7 +10,7 @@ obj AbleToBeDestroyed (Object) {
|
||||
print("Constructed: ")
|
||||
println(data)
|
||||
}
|
||||
fun copy_construct(other:AbleToBeDestroyed*):void {
|
||||
fun copy_construct(other:*AbleToBeDestroyed):void {
|
||||
data = other->data+1
|
||||
print("Copied: ")
|
||||
print(other->data)
|
||||
@@ -69,7 +69,7 @@ fun main(): int {
|
||||
vector(1,2,3,4,5,6,7,8,9,10,11,12).for_each(fun(i:int) { print(i); })
|
||||
println()
|
||||
|
||||
var desVec: vector<AbleToBeDestroyed>* = new<vector<AbleToBeDestroyed>>()->construct();
|
||||
var desVec: *vector<AbleToBeDestroyed> = new<vector<AbleToBeDestroyed>>()->construct();
|
||||
var testDestruct.construct(0): AbleToBeDestroyed;
|
||||
desVec->addEnd(testDestruct);
|
||||
println("delete vector")
|
||||
|
||||
Reference in New Issue
Block a user