Open Stitchous opened 12 years ago
I cannot reproduce it. Which version of compiler is used ?
Please check with latest version, maybe it was fixed: https://github.com/rsdn/nemerle/downloads
just got latests sources from https://github.com/rsdn/nemerle.git, built fresh installer (BuildInstallerFull-4.cmd) and reproduced that error
Works well for me with the latest source. Maybe you have Nemerle compiler installed in the system ? Try to uninstall and remove Nemerle directory from Program Files entirely.
How do you check ? I did:
cd bin\Release\net-4.0\Stage4
ncc test.n
Maybe you have a different code?
using Nemerle.Extensions;
using System.Console;
module Program
{
public struct Test
{
public mutable UintField : uint;
}
Main() : void
{
def test = Test() <- { UintField = 0; };
}
}
ncc /debug+ test.n
Reproduced :)
Actually if are willing to help fixing this issue, you can debug compiler and find out what causes this happen.
Compiling this code:
using Nemerle.Extensions; using System.Console;
module Program { public struct Test { public mutable UintField : uint; }
}
produces following ICE:
error : internal compiler error: got some unknown exception of type System.NullReferenceException: Object reference not set to an instance of an object. at Nemerle.Compiler.MethodBuilder.get_BodyLocation() at Nemerle.Compiler.Typer.RunFullTyping() at Nemerle.Compiler.MethodBuilder.RunBodyTyper() at Nemerle.Compiler.MethodBuilder.Compile() at Nemerle.Compiler.TypeBuilder.EmitImplementation() at Nemerle.Compiler.TypesManager._N_emit_impl60312.apply_void(TypeBuilder ti) at Nemerle.Compiler.TypesManager._N_maybe_f60555.apply_void(TypeBuilder ti) at Nemerle.Collections.NList.Iter[T](list
1 l, FunctionVoid
1 f) at Nemerle.Compiler.TypesManager.Iter(list1 builders, FunctionVoid
1 f) at Nemerle.Compiler.TypesManager.compile_all_tyinfos(Boolean aux_phase) at Nemerle.Compiler.TypesManager._N__N_lambda5973659839.apply_void() at Nemerle.Compiler.Solver.Enqueue(FunctionVoid action) at Nemerle.Compiler.ManagerClass.Run() at Nemerle.CommandlineCompiler.MainClass.main_with_catching()Workaround: UintField = 0U;