-
-
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
Invalid type checking for two instances of the same Generic type #22826
Labels
Comments
!nim c import std/tables
var a: Table[string, float]
type Value*[T] = object
table: Table[string, Value[T]]
discard toTable({"a": Value[float]()}) |
🐧 Linux bisect by @ringabout (member)devel 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.6.14 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) Stats
🤖 Bug found in |
🪟 Windows bisect by @ringabout (member)devel 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.6.14 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) Stats
🤖 Bug found in |
🍎 macOS bisect by @ringabout (member)devel 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.6.14 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("tables")
)
),
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
newIdentNode("float")
),
newEmptyNode()
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("Value")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("table"),
nnkBracketExpr.newTree(
newIdentNode("Table"),
newIdentNode("string"),
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("T")
)
),
newEmptyNode()
)
)
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
newIdentNode("toTable"),
nnkTableConstr.newTree(
nnkExprColonExpr.newTree(
newLit("a"),
nnkCall.newTree(
nnkBracketExpr.newTree(
newIdentNode("Value"),
newIdentNode("float")
)
)
)
)
)
)
) Stats
🤖 Bug found in |
Araq
pushed a commit
that referenced
this issue
Oct 21, 2023
Close #22826 I am not sure why this code skips generic insts, so letting CI tell me. Update: It has told me nothing. Maybe someone knows during review. Issue itself seems to be that the generic instance is skipped thus it ends up being just `float` which makes it use the wrong generic instance of the proc because it matches the one in cache --------- Co-authored-by: SirOlaf <>
narimiran
pushed a commit
that referenced
this issue
Apr 18, 2024
Close #22826 I am not sure why this code skips generic insts, so letting CI tell me. Update: It has told me nothing. Maybe someone knows during review. Issue itself seems to be that the generic instance is skipped thus it ends up being just `float` which makes it use the wrong generic instance of the proc because it matches the one in cache --------- Co-authored-by: SirOlaf <> (cherry picked from commit c13c485)
narimiran
added a commit
that referenced
this issue
Jun 7, 2024
narimiran
pushed a commit
that referenced
this issue
Sep 16, 2024
Close #22826 I am not sure why this code skips generic insts, so letting CI tell me. Update: It has told me nothing. Maybe someone knows during review. Issue itself seems to be that the generic instance is skipped thus it ends up being just `float` which makes it use the wrong generic instance of the proc because it matches the one in cache --------- Co-authored-by: SirOlaf <> (cherry picked from commit c13c485)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When instancing the
Table
type with the same key type and value typesT
andSomeGenericThatUsesTable[T]
, typechecking fails.Minimal example
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-10-14
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: f5d70e7
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
It seems to be present at least in devel, 2.0.0, 1.6.8 and 1.6.0.
The text was updated successfully, but these errors were encountered: