@views throws an error in combination with a struct

This seems to work

(@view x.a[2:end]) .+= (@view y[2:end])

I’d call it an omission(bug). Macro programming is hard. Would suspect .+= isn’t recognized…

Edit: Hm. Seems to be more complicated, because

v1 = [1]
v2 = [2]
@views v1[begin:end] .+= v2[begin:end]

works. So parser precedence again(had this one time before…)?

1 Like