-
-
Save turbo/8d0101656d23e64078782233a7608154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# these are abitrary, but in real code AX >> AY | |
const V_AX* = 10_000 | |
const V_AY* = 1_234 | |
const V_B = (sizeof(BiggestUInt) * 8) | |
const V_C = V_AX div V_B + 1 | |
type | |
V_D* = array[V_C, BiggestUInt] | |
V_E*[I: static int] = array[I, float32] | |
V_F*[N, I: static int] = array[N, V_E[I]] | |
echo "This works:" | |
var foo: V_F[V_AX, V_AY] | |
proc p() = | |
var bar: V_F[V_AX, V_AY] | |
echo "This segfaults at runtime:" | |
p() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment