-
-
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
Nim 2.0/devel inconsistency between equivalant code building or not #22491
Comments
!nim c proc log2trunc(x: uint64 | uint64): int =
if x == 0: int(0) else: int(0)
template maxChunkIdx(T: type): int64 = 0'i64
template layer(vIdx: int64): int = log2trunc(0'u64)
template int2(x: int): int = x
type HashList[T] = object
indices: array[int(layer(maxChunkIdx(T))), int] |
@ringabout (member) devel 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) stable 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) 2.0.0 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) 1.6.0 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) 1.4.0 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) 1.2.0 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) 1.0.0 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) 0.20.2 👎 FAILOutput
Stats
IRCompiled filesize0 bytes (0 bytes)
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("log2trunc"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkInfix.newTree(
newIdentNode("|"),
newIdentNode("uint64"),
newIdentNode("uint64")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("=="),
newIdentNode("x"),
newLit(0)
),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("int"),
newLit(0)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("maxChunkIdx"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int64"),
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("type"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newLit(0)
)
),
nnkTemplateDef.newTree(
newIdentNode("layer"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("vIdx"),
newIdentNode("int64"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("log2trunc"),
nnkUInt64Lit.newTree(
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("int2"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
newIdentNode("x")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("HashList"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("indices"),
nnkBracketExpr.newTree(
newIdentNode("array"),
nnkCall.newTree(
newIdentNode("int"),
nnkCall.newTree(
newIdentNode("layer"),
nnkCall.newTree(
newIdentNode("maxChunkIdx"),
newIdentNode("T")
)
)
),
newIdentNode("int")
),
newEmptyNode()
)
)
)
)
)
) Stats
🤖 Bug found in |
Should be no difference between this and #22490, no? The |
Sure, one happened to compile before and one didn't, though. But yes, the intent between them is the same. |
fixes nim-lang#22490, fixes nim-lang#22491, adapts nim-lang#22029 to type conversions
Description
does not compile (see current output section) but
does compile, on Nim 2.0 and Nim devel, as does
There's both
maxChunkIdx
returnsint64
andlayer
takes anint64
) andlayer()
is a function fromint64
toint
, soint(layer(...))
should be equivalent tolayer(...)
) code builds or not.Nim 1.6 has a different problem with this, evidently addressed in 2.0 already:
Nim Version
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: