-
-
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
Error: 's' has unspecified generic parameters
with generics and template
#21347
Labels
Comments
!nim c type K[T] = object
template s[T]() = discard
proc b1(n: bool | bool) = s[K[K[int]]]()
proc b2(n: bool) = s[K[K[int]]]()
b1(false)
b2(false) |
@juancarlospaco (contributor) devel :-1: FAILOutput
Stats
IRASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("K"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkTemplateDef.newTree(
newIdentNode("s"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("b1"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("bool"),
newIdentNode("bool")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("b2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
newIdentNode("bool"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b1"),
newIdentNode("false")
),
nnkCall.newTree(
newIdentNode("b2"),
newIdentNode("false")
)
) stable :-1: FAILOutput
Stats
IRASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("K"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkTemplateDef.newTree(
newIdentNode("s"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("b1"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("bool"),
newIdentNode("bool")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("b2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
newIdentNode("bool"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b1"),
newIdentNode("false")
),
nnkCall.newTree(
newIdentNode("b2"),
newIdentNode("false")
)
) 1.6.0 :-1: FAILOutput
Stats
IRASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("K"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkTemplateDef.newTree(
newIdentNode("s"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("b1"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("bool"),
newIdentNode("bool")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("b2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
newIdentNode("bool"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b1"),
newIdentNode("false")
),
nnkCall.newTree(
newIdentNode("b2"),
newIdentNode("false")
)
) 1.4.0 :-1: FAILOutput
Stats
IRASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("K"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkTemplateDef.newTree(
newIdentNode("s"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("b1"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("bool"),
newIdentNode("bool")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("b2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
newIdentNode("bool"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b1"),
newIdentNode("false")
),
nnkCall.newTree(
newIdentNode("b2"),
newIdentNode("false")
)
) 1.2.0 :-1: FAILOutput
Stats
IRASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("K"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkTemplateDef.newTree(
newIdentNode("s"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("b1"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("bool"),
newIdentNode("bool")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("b2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
newIdentNode("bool"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b1"),
newIdentNode("false")
),
nnkCall.newTree(
newIdentNode("b2"),
newIdentNode("false")
)
) 1.0.0 :-1: FAILOutput
Stats
IRASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("K"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
),
nnkTemplateDef.newTree(
newIdentNode("s"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkProcDef.newTree(
newIdentNode("b1"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("bool"),
newIdentNode("bool")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("b2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("n"),
newIdentNode("bool"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("s"),
nnkBracketExpr.newTree(
newIdentNode("K"),
nnkBracketExpr.newTree(
newIdentNode("K"),
newIdentNode("int")
)
)
)
)
)
),
nnkCall.newTree(
newIdentNode("b1"),
newIdentNode("false")
),
nnkCall.newTree(
newIdentNode("b2"),
newIdentNode("false")
)
) 42 minutes bisecting 6 commits at 0 commits per second.
|
Now seems to work, maybe because of #23860 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Nim Version
Released stable version:
From
version-1-6
:devel
:version-2-0
:Current Output
Expected Output
Possible Solution
No response
Additional Information
Related to, but potentially distinct from, #21346
The text was updated successfully, but these errors were encountered: