mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
16 lines
275 B
Text
16 lines
275 B
Text
|
fun increment(mutate self: int): self {
|
||
|
self = self + 1;
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
fun cantReturnAnotherSelf(mutate self: int): self {
|
||
|
self = self + 1;
|
||
|
var x = 0;
|
||
|
return x.increment();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
@compilation_should_fail
|
||
|
@stderr invalid return from `self` function
|
||
|
*/
|