fixes #23545; C compiler error when default initializing an object field function (#24375)

fixes #23545
This commit is contained in:
ringabout
2024-10-29 15:08:35 +08:00
committed by GitHub
parent 3fc87259bd
commit 815bbf0e73
2 changed files with 30 additions and 0 deletions

View File

@@ -776,5 +776,18 @@ template main {.dirty.} =
var d: limited_int;
doAssert d == 1
block: # bug #23545
proc evaluate(params: int) =
discard
proc evaluate() =
discard
type SearchInfo = object
evaluation: proc() = evaluate
var a = SearchInfo()
a.evaluation()
static: main()
main()