summaryrefslogtreecommitdiffhomepage
path: root/CompilerDriver/cc2/regression-tests/pure2-hello.cpp2
blob: 8df8da04ba8771c25c97e9f3234e46ba2cbc6d53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

main: () -> int = {
    std::cout << "Hello " << name() << "\n";
}

name: () -> std::string = {
    s: std::string = "world";
    decorate(s);
    return s;
}

decorate: (inout s: std::string) = {
    s = "[" + s + "]";
}