You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code is below. Errors and the problematic code are in the comments
# my_lib
pubconstW = s32:16;pubconstZ = s32:24;
import my_lib;pubconstA = s32:16;pubconstB = s32:24;fnfoo(x:u32) -> (){// 0013: let a = x[my_lib::W : s32:24];// ~~~~~~~~~~~~~~~~~^------------------^ TypeInferenceError: uN[32] Value to index is not an array.// let a = x[my_lib::W : s32:24];// 0017: let b = x[my_lib::W : my_lib::Z];// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ParseError: Old-style cast only permitted for constant arrays/tuples and literal numbers.// let b = x[my_lib::W : my_lib::Z];// OK.let c = x[A:my_lib::Z];// OK.let d = x[A:B];()}
The text was updated successfully, but these errors were encountered:
meheff
added
the
dslx
DSLX (domain specific language) implementation / front-end
label
Nov 19, 2024
Indices using named constants works fine if the constants are locally declared, but not if they are imported (well, at least if the start index is imported). So support is inconsistent.
Code is below. Errors and the problematic code are in the comments
The text was updated successfully, but these errors were encountered: