gregd
11/30/2017, 11:30 PMsuspend doesn’t work with typealias?
Example:
typealias MyType = (Any) -> Any
fun testFunction(block: suspend MyType) {}
// ^^^^^^^
// Modifier 'suspend' is not applicable to 'non-functional type'dave08
12/01/2017, 3:42 AMtypealias MyType = suspend (Any) -> Any? I think it wouldn't make sense in the way you did it since suspend adds another parameter to the function when compiling, so it's another type altogether... but then maybe typealias might also be compile time, so it might be possible.... but a bit hacky?elizarov
12/01/2017, 7:50 AMdave08
12/01/2017, 8:13 AMtypealias MyType = suspend (Any) -> Any should work, no?elizarov
12/01/2017, 8:38 AMsuspend Alias should not, while suspend FunType should work