-
-
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
Recursive concept that has a function with the same name as an existing one causes compiler to read from nil
#24039
Comments
!nim c proc x(y: int): string = discard
type
C = concept
proc x(y: C): int
A[T: C] = tuple
x: T
B*[T: C] = object
a: A[T] |
🐧 Linux bisect by @juancarlospaco (collaborator)devel 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("C"),
newEmptyNode(),
nnkTypeClassTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("C"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("A"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkTupleTy.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("T"),
newEmptyNode()
)
)
),
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("B")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("A"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("C"),
newEmptyNode(),
nnkTypeClassTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("C"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("A"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkTupleTy.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("T"),
newEmptyNode()
)
)
),
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("B")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("A"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
)
) 2.0.8 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("C"),
newEmptyNode(),
nnkTypeClassTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("C"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("A"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkTupleTy.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("T"),
newEmptyNode()
)
)
),
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("B")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("A"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("C"),
newEmptyNode(),
nnkTypeClassTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("C"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("A"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkTupleTy.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("T"),
newEmptyNode()
)
)
),
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("B")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("A"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
)
) 1.6.20 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("string"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("int"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("C"),
newEmptyNode(),
nnkTypeClassTy.newTree(
newEmptyNode(),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkProcDef.newTree(
newIdentNode("x"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newIdentNode("int"),
nnkIdentDefs.newTree(
newIdentNode("y"),
newIdentNode("C"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("A"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkTupleTy.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("T"),
newEmptyNode()
)
)
),
nnkTypeDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("B")
),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("C"),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("a"),
nnkBracketExpr.newTree(
newIdentNode("A"),
newIdentNode("T")
),
newEmptyNode()
)
)
)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
AST1.2.18 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
AST1.0.10 👎 FAILOutput
IRCompiled filesize0 (0 bytes)
Stats
ASTStats
🤖 Bug found in |
Use |
ringabout
added
Invalid Code Acceptance
Everything related to compiler not complaining about invalid code
Error Messages
and removed
Invalid Code Acceptance
Everything related to compiler not complaining about invalid code
labels
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Nim Version
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-08-20
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 5935c3b
active boot switches:
Current Output
Expected Output
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: