fork download
  1. #pragma indent
  2. using System;
  3. using System.Console;
  4. using Nemerle;
  5. using Nemerle.Macros;
  6. using Nemerle.Imperative;
  7. using Nemerle.Utility;
  8.  
  9. def count=int.Parse(ReadLine());
  10.  
  11. foreach(max in [1 .. count])
  12. def items= $[1..max];
  13. def itemsReversedIfNeed=
  14. if(max % 2 == 0)
  15. items.Rev()
  16. else
  17. items;
  18. def itemsOfString=itemsReversedIfNeed.Map(_.ToString());
  19. def line=String.Join("-", itemsOfString.ToArray());
  20. WriteLine(line)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
error: internal compiler error: got ArgumentException (type is not TypeBuilder but System.MonoType
Parameter name: type)
  at System.Reflection.Emit.TypeBuilder.GetMethod (System.Type type, System.Reflection.MethodInfo method) [0x00000] 
  at Nemerle.Compiler.ILEmitter.FrameworkGetMethod (System.Type t, System.Reflection.MethodInfo m) [0x00000] 
  at Nemerle.Compiler.ILEmitter.GetMethodInfo (Nemerle.Compiler.TyVar from_type, IMethod meth, Nemerle.Core.list`1 typars) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.emit (Nemerle.Compiler.Typedtree.TExpr expr) [0x00000] 
  at Nemerle.Compiler.ILEmitter.Run () [0x00000] 
  at Nemerle.Compiler.MethodBuilder+_N__N_l28822_28957.apply_void () [0x00000] 
  at Nemerle.Compiler.TypeBuilder.FinalizeType () [0x00000] 
  at Nemerle.Compiler.TypeBuilder.EmitImplementation () [0x00000] 
  at Nemerle.Compiler.TypesManager+_N_emit_impl_23845.apply_void (Nemerle.Compiler.TypeBuilder _N_23844) [0x00000] 
  at Nemerle.Compiler.TypesManager+_N_maybe_f_24281.apply_void (Nemerle.Compiler.TypeBuilder _N_24280) [0x00000] 
  at Nemerle.Collections.List.Iter[TypeBuilder] (Nemerle.Core.list`1 l, Nemerle.Builtins.FunctionVoid`1 f) [0x00000] 
  at Nemerle.Core.list`1[Nemerle.Compiler.TypeBuilder].Iter (Nemerle.Builtins.FunctionVoid`1 f) [0x00000] 
  at Nemerle.Compiler.TypesManager.Iter (Nemerle.Core.list`1 builders, Nemerle.Builtins.FunctionVoid`1 f) [0x00000] 
  at Nemerle.Compiler.TypesManager.Iter (Nemerle.Builtins.FunctionVoid`1 f) [0x00000] 
  at Nemerle.Compiler.TypesManager.compile_all_tyinfos (Boolean aux_phase) [0x00000] 
  at Nemerle.Compiler.TypesManager+_N__N_l23429_23517.apply_void () [0x00000] 
  at Nemerle.Compiler.Solver.Enqueue (Nemerle.Builtins.FunctionVoid action) [0x00000] 
  at Nemerle.Compiler.TypesManager.EmitDecls () [0x00000] 
  at Nemerle.Compiler.Passes.Run () [0x00000] 
  at Nemerle.CommandlineCompiler.MainClass.main_with_catching () [0x00000] 

stdout
Standard output is empty