It is possible to assign a borrowed variable to another variable declared outside of the borrowing scope:
read trait Hello
def hello() : unit
println("Hello, World!")
end
end
linear class Foo : Hello
end
active class Main
def main() : unit
var x = new Foo
var z = null : borrowed Foo
borrow x as y in
z = y -- This assignment should not be allowed!
end
-- z is now an alias of (the supposedly linear) x
z.hello()
x.hello()
end
end