rsdn/nemerle — Issue #303: ICE NullReferenceException
Author: valeskas
Created: 2012-03-06 09:08:26+00:00
State: open

Test2.n

mutable x: object;
match (x)
{
| 1 :> object => {};
}

expected result: no ICE
actual result:

c:\Program Files (x86)\Nemerle\net-4.0>ncc32 -no-color -debug+ test2.n
test2.n:4:7:4:18: warning: N10001: there is no check needed to cast int to object
test2.n:4:7:4:18: hint: consider using : instead of :>
test2.n:4:7:4:18: warning: N10001: there is no check needed to cast int to object
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_impl__60297.apply_void(TypeBuilder ti)
at Nemerle.Compiler.TypesManager._N_maybe_f__60540.apply_void(TypeBuilder ti)
at Nemerle.Collections.NList.Iter[T](list`1 l, FunctionVoid`1 f)
at Nemerle.Compiler.TypesManager.Iter(list`1 builders, FunctionVoid`1 f)
at Nemerle.Compiler.TypesManager.compile_all_tyinfos(Boolean aux_phase)
at Nemerle.Compiler.TypesManager._N__N_lambda__59721__59824.apply_void()
at Nemerle.Compiler.Solver.Enqueue(FunctionVoid action)
at Nemerle.Compiler.TypesManager.EmitDecls()
at Nemerle.Compiler.ManagerClass.Run()
at Nemerle.CommandlineCompiler.MainClass.main_with_catching()

c:\Program Files (x86)\Nemerle\net-4.0>ncc32 -version
Nemerle Compiler (ncc) version 1.1.660.0 (SVN)
Copyright (c) University of Wroclaw 2003-2008, Nemerle Project Team 2008-2011
All rights reserved.