# This file is part of NIT ( http://www.nitlanguage.org ).
#
-# Copyright 2011-2013 Alexis Laferrière <alexis.laf@xymus.net>
+# Copyright 2011-2014 Alexis Laferrière <alexis.laf@xymus.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
return new_A( s - o );
`}
+ fun -: A import value, A `{
+ int s = A_value(recv);
+ return new_A(-s);
+ `}
+
fun *( by : Int ) : A import value, A `{
int s = A_value( recv );
return new_A( s / by );
`}
- redef fun ==( other ) import value, nullable Object as(A) `{
+ redef fun ==( other ) import value, nullable Object.as(A) `{
if ( nullable_Object_is_a_A( other ) &&
A_value( nullable_Object_as_A(other) ) == A_value( recv ) )
return 1;
a[ 74 ] = new A( 96 )
print a # 96
+print(-(new A(123)))