-
-
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 $ proc fails to resolve #24022
Comments
!nim cpp --gc:arc type
Foo[T] = object
el: seq[T]
Bar[T] = object
el: seq[T]
proc `$`*[T](x: Foo[T]) : string =
result = "bar: "
let maxIdx = len(x.el)
for i in 0..maxIdx-1:
let e = x.el[i]
result.add $(e)
if i < len-1:
result.add ", "
proc `$`*(x: Bar[auto]) : string =
result = "bar: "
let maxIdx = len(x.el)
for i in 0..maxIdx-1:
let e = x.el[i]
result.add $(e)
if i < len-1:
result.add ", "
proc main() =
var f = Foo[float](el: @[25.5])
var b = Bar[float](el: @[25.5])
echo f
echo b
when isMainModule:
main() |
🐧 Linux bisect by @Clonkk (contributor)devel 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) 2.0.8 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) 1.6.20 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Foo"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Bar"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("el"),
nnkBracketExpr.newTree(
newIdentNode("seq"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("$")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("auto")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newLit("bar: ")
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("maxIdx"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("len"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
)
)
)
),
nnkForStmt.newTree(
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode(".."),
newLit(0),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("maxIdx"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("e"),
newEmptyNode(),
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("el")
),
newIdentNode("i")
)
)
),
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
nnkPrefix.newTree(
newIdentNode("$"),
nnkPar.newTree(
newIdentNode("e")
)
)
),
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("<"),
newIdentNode("i"),
nnkInfix.newTree(
newIdentNode("-"),
newIdentNode("len"),
newLit(1)
)
),
nnkStmtList.newTree(
nnkCommand.newTree(
nnkDotExpr.newTree(
newIdentNode("result"),
newIdentNode("add")
),
newLit(", ")
)
)
)
)
)
)
)
),
nnkProcDef.newTree(
newIdentNode("main"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("f"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Foo"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("b"),
newEmptyNode(),
nnkObjConstr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Bar"),
newIdentNode("float")
),
nnkExprColonExpr.newTree(
newIdentNode("el"),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(25.5)
)
)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("f")
),
nnkCommand.newTree(
newIdentNode("echo"),
newIdentNode("b")
)
)
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
newIdentNode("isMainModule"),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("main")
)
)
)
)
) Stats
🤖 Bug found in |
No issue |
The error message getting lost makes that harder to see |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Nim Version
Tested on :
And :
Current Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: