scope: refuse `&x` where x is a local variable
[nit.git] / tests / error_prop_loc.nit
index e0407ad..4872f08 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import end
-class Object
-end
+import kernel
 
 class A
-       meth toto do end
+       fun toto do 1.output
 end
 class B
-special A
-       redef meth toto do end
+       super A
+       redef fun toto do 2.output
 end
 class C
-special A
-       redef meth toto do end
+       super A
+       redef fun toto do 3.output
 end
 class D
-special B
-special C
+       super B
+       super C
 end
+
+(new A).toto
+(new B).toto
+(new C).toto
+#alt1#(new D).toto