Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile nested generic type with constraint #542

Open
NN--- opened this issue Sep 18, 2013 · 0 comments
Open

Cannot compile nested generic type with constraint #542

NN--- opened this issue Sep 18, 2013 · 0 comments

Comments

@NN---
Copy link
Member

NN--- commented Sep 18, 2013

Same code in C# compiles fine.

public class AA[T]
{
  public class B[U] : AA[U] where U : B[U] {}
}
error: internal compiler error: assertion ``self_type != null'' failed in file ncc\hierarchy\TypeInfo.n, line 1081: AA.B
   at Nemerle.Compiler.TypeInfo.NestingSubst(TypeInfo parent)
   at Nemerle.Compiler.TypeVarEnv.bind_simple_named_type(GlobalEnv env, TypeBuilder currentType, Name name, list`1 idl, list`1 args, Location loc)
   at Nemerle.Compiler.TypeVarEnv._N_type_class_125915(_N_closureOf_Bind_125881 _N_Bind_cp_125914, PExpr tyexpr)
   at Nemerle.Compiler.TypeVarEnv._N_f2_125909(_N_closureOf_Bind_125881 _N_Bind_cp_125908, PExpr t, Boolean allow_ref)
   at Nemerle.Compiler.TypeVarEnv._N_f__125900.apply(PExpr t)
   at Nemerle.Compiler.TypeVarEnv.Bind(GlobalEnv env, TypeBuilder currentType, PExpr t, Boolean allow_tyvars, Boolean check_parms)
   at Nemerle.Compiler.TypeVarEnv.BindFixedType(GlobalEnv env, TypeBuilder currentType, PExpr t, Boolean check_parms)
   at Nemerle.Compiler.TypeVarEnv.AddTyparms(GlobalEnv env, Typarms tp, TypeBuilder currentType, Boolean check_parms)
   at Nemerle.Compiler.TypeBuilder.make_tyenvs()
   at Nemerle.Compiler.TypeBuilder.make_tyenvs()
   at Nemerle.Compiler.TypesManager.Run()
   at Nemerle.Compiler.ManagerClass.Run()
   at Nemerle.CommandlineCompiler.MainClass.main_with_catching()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant