mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
15 lines
401 B
Text
15 lines
401 B
Text
|
fun incNotChained(mutate self: int) {
|
||
|
self = self + 1;
|
||
|
}
|
||
|
|
||
|
fun failWhenReturnANotChainedValue(x: int): int {
|
||
|
return x.incNotChained();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
The error is very weird, but nevertheless, the type system prevents of doing such errors.
|
||
|
|
||
|
@compilation_should_fail
|
||
|
@stderr previous function return type int cannot be unified with return statement expression type (): cannot unify type () with int
|
||
|
*/
|