# Test cobra catches mismatch on (in)/out/inout labels between args and params class InOutMismatch def foo(x as inout int) x = 5 def bar(x as out int) x = 15 def baz(x as int) pass def main y = 0 .foo(y) # .error. supplying a regular one. assert y == 5 .foo(out y) # .error. supplying an "out" one. assert y == 5 .foo(inout y) # OK assert y == 5 z = 0 .bar(z) # .error. supplying a regular one. assert z == 15 .bar(inout z) # .error. supplying an "inout" one. assert z == 15 .bar(out z) # OK assert z == 15 x = 0 .baz(x) # OK assert x == 0 .baz(out x) # .error. supplying an "out" one. assert x == 0 .baz(inout x) # .error. supplying an "inout" one. assert x == 0