I don't see a bug? The code is doing exactly what you asked.
    
    
    type
      MyArr = ref array[4, int]
      MyObj = ref object
      MyArrObj = ref object
        arr {.align(256).}: array[4, int]
    
    
    Run

There is no constraint on `MyArr` and `MyObj` type at all.
    
    
    var arr {.align(256).}: MyArr
    var obj {.align(256).}: MyObj
    var arrObj: MyArrObj
    
    
    Run

Now you add a constraint on the very specific instantantiations `arr` and `obj` 
which are of type `ref array` and `ref object`

If you do the same in C or C++, you'll have the exact same behavior.

Reply via email to