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 cantCallNotChainedMethodsInAChain(x: int) {
|
||
|
return x.incNotChained().incNotChained();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
The error is very weird, but nevertheless, the type system prevents of doing such errors.
|
||
|
|
||
|
@compilation_should_fail
|
||
|
@stderr cannot apply function incNotChained : int -> (int, ()) to arguments of type (): cannot unify type () with int
|
||
|
*/
|