Такой вот код:
using System.Linq;
module Program
{
public static Id[T](x : T) : T { x }
Main() : void
{
//_ = [1,2,3].Select(Id); //ok
//_ = [1,2,3].ToDictionary(Id, _ => string.Empty); //ok
//_ = [1,2,3].Select(x => x).ToDictionary(x => x, _ => string.Empty); //ok
_ = [1,2,3].Select(x => x).ToDictionary(Id, _ => string.Empty); //error
}
}
Вызывает у компилятора версии 1.0.0.9025 ICE
с таким вот текстом:
ICE! (Internal Compiler Error)
nonfunction type?
at Typer3._N_properApply_71195(_N_closure_71163 _N_EmitDelegateCtor_cp_71194, FixedType mtype)
at Typer3.EmitDelegateCtor(TypeVar ret_ty, StaticRef sr, TExpr parm)
at Typer3.DoWalk(TExpr expr)
at TExpr.walk(Function`2 f, TExpr expr)
at Typer3.EmitCall(Location loc, TypeVar ret_type, TExpr func, list`1 parms, Boolean is_tail)
at Typer3.DoWalk(TExpr expr)
at TExpr.walk(Function`2 f, TExpr expr)
at TExpr.do_walk(Function`2 f, TExpr expr)
at TExpr.walk(Function`2 f, TExpr expr)
at TExpr.do_walk(Function`2 f, TExpr expr)
at TExpr.walk(Function`2 f, TExpr expr)
at TExpr.do_walk(Function`2 f, TExpr expr)
at TExpr.walk(Function`2 f, TExpr expr)
at Typer3.Walk(TExpr expr)
at Typer3.Run()
at Typer.RunFullTyping()
at MethodBuilder.RunBodyTyper()
at MethodBuilder.Compile()
at TypeBuilder.EmitImplementation()
at _N_emit_impl__54147.apply_void(TypeBuilder _N__54146)
at _N_maybe_f__54714.apply_void(TypeBuilder _N__54713)
at NList.Iter(list`1 l, FunctionVoid`1 f)
at list`1.Iter(FunctionVoid`1 f)
at TypesManager.Iter(list`1 builders, FunctionVoid`1 f)
at TypesManager.compile_all_tyinfos(Boolean aux_phase)
at _N__N_lambda__53587__53690.apply_void()
at Solver.Enqueue(FunctionVoid action)
at ManagerClass.Run()
at MainClass.main_with_catching()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart()
Поиск по "nonfunction type?" в багтрекере ничего не дал.
Это известная проблема или можно репортить баг?
... << RSDN@Home 1.2.0 alpha 4 rev. 1476>>
'You may call it "nonsense" if you like, but I'VE heard nonsense, compared with which that would be as sensible as a dictionary!' (c) Lewis Carroll
Здравствуйте, Klapaucius, Вы писали:
О багах надо
сюда писать.