Comments (4)
!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()
from nim.
No issue len
is not defined, this can be found by explicitly invoking $
. Converters are not invoked when they fail. if i < x.el.len-1:
makes it work.
from nim.
🐧 Linux bisect by @Clonkk (contributor)
devel 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:32
- Finished
2024-08-28T09:01:32
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:36
- Finished
2024-08-28T09:01:36
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:36
- Finished
2024-08-28T09:01:37
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:40
- Finished
2024-08-28T09:01:41
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:44
- Finished
2024-08-28T09:01:44
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:47
- Finished
2024-08-28T09:01:47
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:50
- Finished
2024-08-28T09:01:50
- Duration
AST
nnkStmtList.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 👎 FAIL
Output
IR
Compiled filesize0 (0 bytes)
Stats
- Started
2024-08-28T09:01:53
- Finished
2024-08-28T09:01:53
- Duration
AST
nnkStmtList.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
- GCC
11.4.0
- Clang
14.0.0
- NodeJS
20.4
- Created
2024-08-28T09:01:08Z
- Comments
1
- Commands
nim cpp --gc:arc -d:nimArcDebug -d:nimArcIds --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
🤖 Bug found in 23 mins
bisecting 8
commits at 0
commits per second
from nim.
The error message getting lost makes that harder to see
from nim.
Related Issues (20)
- Suboptimal for-loop transformation in regards to closure iters
- SIGSEGV: Object with pure enum in proc HOT 3
- Parameter not matched in template following symchoice changes HOT 13
- Output executable is not updated after changing build mode HOT 2
- Cast seq to string, heap buffer overflow with stdlib assuming terminating '\0' HOT 5
- Objects casting and custom destructor HOT 3
- `IndexDefect` on `--verbosity:3` when compiling nimbus HOT 1
- Double template invocation causes bad codegen (duplicate gensym) HOT 4
- SIGSEGV from OpenSSL when used in async context
- js codegen bug for `case` statement with just `else` branch HOT 4
- Unexpected behavior with range types and custom operators HOT 8
- Yielding from var fails with pairs and destructuring HOT 4
- Invalid C code generated for `lent array` in `tuple`
- Recursive concept that has a function with the same name as an existing one causes compiler to read from `nil` HOT 2
- Compiler error when passing a generic parameter restricted by some concept as a generic parameter to some type which restricts that parameter by the same concept. HOT 2
- compile-time int conversion fails in `when false` section
- Cannot instantiate `static int` with computed value
- Compiler crash on template evaluation for generic `static int` HOT 1
- Cannot compute `sizeof` generic type in alias
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nim.