ICE
От: DarthSidius  
Дата: 18.01.15 05:25
Оценка:
class C1[T] where T : C1[T], new()
{
    public Prop : int { get; protected set }
    
    public static StM() : void
    {
        def a = T();
        a.Prop = 666;
    }
}


C:\Program Files (x86)\Nemerle\Net-4.0\Nemerle.MSBuild.targets(289,5): 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.MemberInfo.CanAccess(TypeInfo memberTypeInfo, TypeInfo currentTypeInfo, Boolean isThisAccess)
at Nemerle.Compiler.Typer2.DoWalk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Walk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.DoWalk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Walk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.DoWalk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Walk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.DoWalk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Walk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.DoWalk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Walk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.DoWalk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Walk(Context ctx, TExpr expr)
at Nemerle.Compiler.Typer2.Run()
at Nemerle.Compiler.Typer.RunSecondPass(MethodBuilder meth)
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__62688.apply_void(TypeBuilder ti)
at Nemerle.Compiler.TypesManager._N_maybe_f__62939.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__62112__62215.apply_void()
at Nemerle.Compiler.Solver.Enqueue(FunctionVoid action)
at Nemerle.Compiler.ManagerClass.Run()
at Nemerle.CommandlineCompiler.MainClass.main_with_catching()
Done building project "Test4.nproj" -- FAILED.


Net 4.0, Nemerle 1.2.415

Что делать?
... << RSDN@Home (RF) 1.2.0 alpha 5 rev. 58>>
♠♠♥♠♠♦♥
Re: ICE
От: s22  
Дата: 18.01.15 07:24
Оценка:
class C1[T] where T : C1[T], new()
{
    public Prop : int { get; protected set }
    
    public static StM() : void
    {
        def a = T();
        a.Prop = 666;
    }
}


А new тут что значит?
Re[2]: ICE
От: DarthSidius  
Дата: 18.01.15 07:52
Оценка:
Здравствуйте, s22, Вы писали:

s22>А new тут что значит?


Тоже, что и в шарпе — тип Т должен иметь конструктор без параметров. И поэтому легально такое:
    def a = T();
... << RSDN@Home (RF) 1.2.0 alpha 5 rev. 58>>
♠♠♥♠♠♦♥
Re: ICE
От: _NN_ www.nemerleweb.com
Дата: 18.01.15 13:14
Оценка:
Здравствуйте, DarthSidius, Вы писали:

Похоже регрессия.
Компилятор 0.9.3 это собирает ( с небольшими измененияеми )

http://ideone.com/R1LAhx
class C1[T] where T : C1[T], new()
{
 mutable p : int;
 public Prop : int { get {p}; protected set {p=value} }
 public static StM() : void
 {
  def a = T();
  a.Prop = 666;
 }
}
http://rsdn.nemerleweb.com
http://nemerleweb.com
Re: ICE
От: VladD2 Российская Империя www.nemerle.org
Дата: 19.01.15 13:50
Оценка:
Здравствуйте, DarthSidius, Вы писали:

DS>Что делать?


Завести issue на https://github.com/rsdn/nemerle/

Поместить ссылку на него сюда. Как будет время, поглядим. Ну, или самому поглядеть под отладчиком.
Есть логика намерений и логика обстоятельств, последняя всегда сильнее.
Re[2]: ICE
От: DarthSidius  
Дата: 20.01.15 04:15
Оценка:
Здравствуйте, VladD2, Вы писали:

VD>Завести issue на https://github.com/rsdn/nemerle/


VD>Поместить ссылку на него сюда. Как будет время, поглядим. Ну, или самому поглядеть под отладчиком.


Ок, как назвать исуе?
... << RSDN@Home (RF) 1.2.0 alpha 5 rev. 58>>
♠♠♥♠♠♦♥
Re: ICE
От: DarthSidius  
Дата: 21.01.15 05:39
Оценка:
Здравствуйте, DarthSidius, Вы писали:

https://github.com/rsdn/nemerle/issues/13283
... << RSDN@Home (RF) 1.2.0 alpha 5 rev. 58>>
♠♠♥♠♠♦♥
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.