-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Generic procs fails to properly instantiate a type #23287
Labels
Comments
!nim c template emitTupleType(trait: typedesc): untyped =
trait
type
Traitor[Traits] = ref object of RootObj ##
vtable: emitTupleType(Traits)
type Generic[X] = object
proc test2[Traits](val: Traitor[Generic[Traits]]) =
static: assert val.vtable is int
proc test[X](val: Traitor[Generic[X]]) = discard
test2 Traitor[Generic[int]]() # This should error, but passes
test Traitor[Generic[int]]() |
🐧 Linux bisect by @ringabout (member)devel 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) 1.6.14 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTemplateDef.newTree(
newIdentNode("emitTupleType"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("untyped"),
nnkIdentDefs.newTree(
newIdentNode("trait"),
newIdentNode("typedesc"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("trait")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Traitor"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkRefTy.newTree(
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("RootObj")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vtable"),
nnkCall.newTree(
newIdentNode("emitTupleType"),
newIdentNode("Traits")
),
newEmptyNode()
)
)
)
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Generic"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("test2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("Traits"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("Traits")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkStaticStmt.newTree(
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("assert"),
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("val"),
newIdentNode("vtable")
),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("X"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("val"),
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("X")
)
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test2"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Traitor"),
nnkBracketExpr.newTree(
newIdentNode("Generic"),
newIdentNode("int")
)
)
)
)
) Stats
🤖 Bug found in |
Works now but |
metagn
added a commit
to metagn/Nim
that referenced
this issue
Dec 8, 2024
closes nim-lang#6013, closes nim-lang#7009, closes nim-lang#9190, closes nim-lang#12487, closes nim-lang#12831, closes nim-lang#13184, closes nim-lang#13252, closes nim-lang#14860, closes nim-lang#14877, closes nim-lang#14894, closes nim-lang#14917, closes nim-lang#16153, closes nim-lang#16439, closes nim-lang#17779, closes nim-lang#18074, closes nim-lang#18202, closes nim-lang#18314, closes nim-lang#18648, closes nim-lang#19063, closes nim-lang#19446, closes nim-lang#20065, closes nim-lang#20367, closes nim-lang#22126, closes nim-lang#22820, closes nim-lang#22888, closes nim-lang#23020, closes nim-lang#23287, closes nim-lang#23510
narimiran
pushed a commit
that referenced
this issue
Jan 14, 2025
closes #6013, closes #7009, closes #9190, closes #12487, closes #12831, closes #13184, closes #13252, closes #14860, closes #14877, closes #14894, closes #14917, closes #16153, closes #16439, closes #17779, closes #18074, closes #18202, closes #18314, closes #18648, closes #19063, closes #19446, closes #20065, closes #20367, closes #22126, closes #22820, closes #22888, closes #23020, closes #23287, closes #23510 (cherry picked from commit aeb3fe9)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Nim Version
2.0.2 and devel
Current Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: