mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-13 03:32:22 +00:00
19 lines
386 B
Text
19 lines
386 B
Text
|
fun failOnInstantiation(a: slice) {
|
||
|
var b: slice = foo(a);
|
||
|
}
|
||
|
|
||
|
fun bar<X>(value: X) : X {
|
||
|
return 1;
|
||
|
}
|
||
|
fun foo<X>(value: X) : X {
|
||
|
return bar(value);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
@compilation_should_fail
|
||
|
@stderr while instantiating generic function `foo<slice>`
|
||
|
@stderr while instantiating generic function `bar<slice>`
|
||
|
@stderr can not convert type `int` to return type `slice`
|
||
|
@stderr return 1
|
||
|
*/
|