mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-11 19:59:32 +00:00
closes #22842, closes #21252, closes #19312, closes #16956, closes #16416, closes #14913, closes #13296, closes #12424, closes #10902, closes #9892, closes #9617
36 lines
801 B
Nim
36 lines
801 B
Nim
discard """
|
|
output: '''done'''
|
|
"""
|
|
# Issue #21252: Compiler SIGSEGV when not instantiating generic proc correctly
|
|
# https://github.com/nim-lang/Nim/issues/21252
|
|
|
|
type
|
|
Addr = object
|
|
layerIdx: int
|
|
|
|
type Msg0 = object
|
|
address: Addr
|
|
selSample: tuple[inArrays: seq[seq[float64]], target: seq[float64], gradientStrength: float64]
|
|
|
|
type WeightUpdate = object
|
|
address: Addr
|
|
|
|
proc workerThread[
|
|
layer0StimulusWidth: static int
|
|
]() =
|
|
discard
|
|
|
|
proc z*[
|
|
layer0StimulusWidth: static int,
|
|
nUnitsPerLayer: static seq[int],
|
|
targetLen: static int
|
|
]() =
|
|
workerThread[layer0StimulusWidth]()
|
|
|
|
when isMainModule:
|
|
const layer0StimulusWidth: int = 5*29
|
|
const nUnitsPerLayer: seq[int] = @[50, 5]
|
|
const targetLen: int = 5
|
|
z[layer0StimulusWidth, nUnitsPerLayer, targetLen]()
|
|
echo "done"
|