Skip to content
This repository
Browse code

now that we have autoviv, our at_pos invocants need to be defined to …

…avoid ambiguous calls
  • Loading branch information...
commit 9d96c04b30bea77cbe83bdc77561ab1293f30800 1 parent 1bb1a9b
Moritz Lenz authored April 21, 2012

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. 14  lib/NativeCall.pm6
14  lib/NativeCall.pm6
@@ -122,10 +122,10 @@ my class OpaquePointer is export is repr('CPointer') { }
122 122
 
123 123
 # CArray class, used to represent C arrays.
124 124
 my class CArray is export is repr('CArray') {
125  
-    method at_pos($pos) { die "CArray cannot be used without a type" }
  125
+    method at_pos(CArray:D: $pos) { die "CArray cannot be used without a type" }
126 126
     
127 127
     my role IntTypedCArray[::TValue] does Positional[TValue] {
128  
-        multi method at_pos(\$arr: $pos) is rw {
  128
+        multi method at_pos(::?CLASS:D \$arr: $pos) is rw {
129 129
             Proxy.new:
130 130
                 FETCH => method () {
131 131
                     nqp::p6box_i(nqp::r_atpos_i($arr, nqp::unbox_i($pos.Int)))
@@ -135,7 +135,7 @@ my class CArray is export is repr('CArray') {
135 135
                     self
136 136
                 }
137 137
         }
138  
-        multi method at_pos(\$arr: int $pos) is rw {
  138
+        multi method at_pos(::?CLASS:D \$arr: int $pos) is rw {
139 139
             Proxy.new:
140 140
                 FETCH => method () {
141 141
                     nqp::p6box_i(nqp::r_atpos_i($arr, $pos))
@@ -151,7 +151,7 @@ my class CArray is export is repr('CArray') {
151 151
     }
152 152
     
153 153
     my role NumTypedCArray[::TValue] does Positional[TValue] {
154  
-        multi method at_pos(\$arr: $pos) is rw {
  154
+        multi method at_pos(::?CLASS:D \$arr: $pos) is rw {
155 155
             Proxy.new:
156 156
                 FETCH => method () {
157 157
                     nqp::p6box_n(nqp::r_atpos_n($arr, nqp::unbox_i($pos.Int)))
@@ -161,7 +161,7 @@ my class CArray is export is repr('CArray') {
161 161
                     self
162 162
                 }
163 163
         }
164  
-        multi method at_pos(\$arr: int $pos) is rw {
  164
+        multi method at_pos(::?CLASS:D \$arr: int $pos) is rw {
165 165
             Proxy.new:
166 166
                 FETCH => method () {
167 167
                     nqp::p6box_n(nqp::r_atpos_n($arr, $pos))
@@ -177,7 +177,7 @@ my class CArray is export is repr('CArray') {
177 177
     }
178 178
     
179 179
     my role TypedCArray[::TValue] does Positional[TValue] {
180  
-        multi method at_pos(\$arr: $pos) is rw {
  180
+        multi method at_pos(::?CLASS:D \$arr: $pos) is rw {
181 181
             Proxy.new:
182 182
                 FETCH => method () {
183 183
                     nqp::r_atpos($arr, nqp::unbox_i($pos.Int))
@@ -187,7 +187,7 @@ my class CArray is export is repr('CArray') {
187 187
                     self
188 188
                 }
189 189
         }
190  
-        multi method at_pos(\$arr: int $pos) is rw {
  190
+        multi method at_pos(::?CLASS:D \$arr: int $pos) is rw {
191 191
             Proxy.new:
192 192
                 FETCH => method () {
193 193
                     nqp::r_atpos($arr, $pos)

0 notes on commit 9d96c04

Please sign in to comment.
Something went wrong with that request. Please try again.