-
-
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 concepts not compatible with openarray #23872
Labels
Comments
!nim c import std / sequtils
type
OrderedContainer*[T] = concept x # basically openarray in concept form
x.len is SomeInteger
for index, item in x.pairs:
index is Ordinal
item is T
type IndexType = typeOf(x.pairs.toSeq[0].key)
x[IndexType] is T
let exampleData = @[1, 2, 3]
block conceptInsideOpenArray:
proc conceptProc[T](arg: OrderedContainer[T]) =
echo arg.len
proc openarrayProc[T](arg: openarray[T]) =
conceptProc(arg)
conceptProc(exampleData) # compiles
openarrayProc(exampleData) # code gen fails
block openArrayInsideConcept:
proc openarrayProc2[T](arg: openarray[T]) =
echo arg.len
proc conceptProc2[T](arg: OrderedContainer[T]) =
openarrayProc2(arg)
openarrayProc2(exampleData) # compiles
conceptProc2(exampleData) # nim compiler crash |
🐧 Linux bisect by @juancarlospaco (collaborator)devel 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArgList.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArgList.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) 2.0.4 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArgList.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArgList.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) 1.6.20 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArgList.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArglist.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArglist.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("sequtils")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("OrderedContainer")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkTypeClassTy.newTree(
nnkArglist.newTree(
newIdentNode("x")
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
),
newIdentNode("SomeInteger")
),
nnkForStmt.newTree(
newIdentNode("index"),
newIdentNode("item"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
nnkStmtList.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("index"),
newIdentNode("Ordinal")
),
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("item"),
newIdentNode("T")
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("IndexType"),
newEmptyNode(),
nnkCall.newTree(
newIdentNode("typeOf"),
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("pairs")
),
newIdentNode("toSeq")
),
newLit(0)
),
newIdentNode("key")
)
)
)
),
nnkInfix.newTree(
newIdentNode("is"),
nnkBracketExpr.newTree(
newIdentNode("x"),
newIdentNode("IndexType")
),
newIdentNode("T")
)
)
)
)
),
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("exampleData"),
newEmptyNode(),
nnkPrefix.newTree(
newIdentNode("@"),
nnkBracket.newTree(
newLit(1),
newLit(2),
newLit(3)
)
)
)
),
nnkBlockStmt.newTree(
newIdentNode("conceptInsideOpenArray"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("conceptProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("openarrayProc"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("conceptProc"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("openarrayProc"),
newIdentNode("exampleData")
)
)
),
nnkBlockStmt.newTree(
newIdentNode("openArrayInsideConcept"),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("openarrayProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("openarray"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("arg"),
newIdentNode("len")
)
)
)
),
nnkProcDef.newTree(
newIdentNode("conceptProc2"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("arg"),
nnkBracketExpr.newTree(
newIdentNode("OrderedContainer"),
newIdentNode("T")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("arg")
)
)
),
nnkCall.newTree(
newIdentNode("openarrayProc2"),
newIdentNode("exampleData")
),
nnkCall.newTree(
newIdentNode("conceptProc2"),
newIdentNode("exampleData")
)
)
)
) Stats
🤖 Bug found in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Mixing generic concepts with openarray leads to compiler crashes.
The compiler matches compatible concept container types with the equivalent openarry type but mishandles them.
Procs taking the concept type, when passed an openarray, generate bad code.
Procs taking an openarray, when passed a concept, crash the nim compiler.
Example
Nim Version
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 5935c3b
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: