Swapped pointers to the other side for types to prevent ambiguity, i.e. *int instead of int*
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
obj Swapper<T> {
|
||||
fun doit(a: T*, b: T*) : void {
|
||||
fun doit(a: *T, b: *T) : void {
|
||||
var temp: T = *a;
|
||||
*a = *b;
|
||||
*b = temp;
|
||||
@@ -9,7 +9,7 @@ obj Swapper<T> {
|
||||
}
|
||||
|
||||
|
||||
fun swap<T>(a: T*, b: T*) : void {
|
||||
fun swap<T>(a: *T, b: *T) : void {
|
||||
var temp: T = *a
|
||||
*a = *b
|
||||
*b = temp;
|
||||
|
||||
Reference in New Issue
Block a user