Updated `tests/syntax_callref.nit`
[nit.git] / tests / syntax_callref.nit
index 074c7c7..cd18f7b 100644 (file)
@@ -11,6 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import functional
 
 redef class Object
        fun foo: Object
@@ -28,6 +29,13 @@ redef class Object
                print "baz{self}"
                return self
        end
+
+        redef fun to_s
+        do
+               # cname without generics (for erasure compiler)
+               var cname = class_name.split('[')[0]
+               return "<{cname}>"
+        end
 end
 
 class Y