spatial-lang icon indicating copy to clipboard operation
spatial-lang copied to clipboard

a to b Not Implemented?

Open mattfel1 opened this issue 7 years ago • 1 comments

Should it be implemented?

for (i <- 0 to 8) gives the error:

[error] /local/ssd/home/mattfel/spatial-lang/apps/src/hotfix.scala:32: not enough arguments for method to: (implicit evidence$1: hotfix.IR.Meta[B], implicit cast: hotfix.IR.Cast[Int,B], implicit ctx: org.virtualized.SourceContext)B.
[error] Unspecified value parameters cast, ctx.
[error]     for (i <- 0 to 7) {
[error]                 ^
[error] one error found

mattfel1 avatar Apr 20 '17 19:04 mattfel1

Unfortunately we haven't been able to support this, as the implicit class that allows us to do 0.to[Int] is different than the one that would allow us to do 0 to 7, making the compiler think they're ambiguous.

As a workaround, use 0 until 8.

dkoeplin avatar Apr 20 '17 21:04 dkoeplin