I face the same limitation and just implemented a typeDef macro in my 
constructor package to get around it, resuling in a DSL that looks like. 
    
    
    import ../src/constructor
    
    typeDef(Test, true):
            a b = int
            d = seq[int]:
                get(true):
                    test.dBacker
                set(true): #In setters value is the input value
                    if value.len >= 1:
                        test.dBacker = value[0..2]
    
    var a = Test()
    a.d = @[100, 200, 300, 400]
    assert a.d == @[100 ,200, 300] #Means the Setter did the job
    
    
    Run

Reply via email to