aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/array_literal_return.zc
blob: 7ccad17f96800ac6ebf96492cc13a77dedec88c6 (plain) (blame)
1
2
3
4
5
namespace;

// expect: an array literal cannot escape its function through return
fn bad() { return (int[]){1,2}; }
fn main() { return 0; }