Infer coroutine effects automatically
This commit is contained in:
parent
bac1183593
commit
5b30e49486
15 changed files with 339 additions and 103 deletions
|
|
@ -1583,40 +1583,41 @@ func builtinHoverDetail(name string) (string, bool) {
|
|||
}
|
||||
|
||||
var builtinDetails = map[string]string{
|
||||
"println": "fun println(value: Any): Unit",
|
||||
"runCatching": "fun runCatching(block: () -> Unit): Result",
|
||||
"Channel": "fun Channel<T>(capacity: Int = 0): Channel<T>",
|
||||
"listOf": "fun listOf<T>(values: T...): List<T>",
|
||||
"mutableListOf": "fun mutableListOf<T>(values: T...): MutableList<T>",
|
||||
"mapOf": "fun mapOf<K, V>(pairs: Any...): Map<K, V>",
|
||||
"mutableMapOf": "fun mutableMapOf<K, V>(pairs: Any...): MutableMap<K, V>",
|
||||
"ByteSlice": "fun ByteSlice(value: String | Int): ByteSlice",
|
||||
"append": "fun append<T>(values: List<T>, value: T): List<T>",
|
||||
"keys": "fun keys<K, V>(values: Map<K, V>): List<K>",
|
||||
"goAssert": "fun goAssert<T>(value: Any): T",
|
||||
"len": "fun len(value: Any): Int",
|
||||
"cap": "fun cap(value: Any): Int",
|
||||
"make": "fun make<T>(size: Int): T",
|
||||
"new": "fun new<T>(): *T",
|
||||
"copy": "fun copy(target: Any, source: Any): Int",
|
||||
"delete": "fun delete(map: Any, key: Any): Unit",
|
||||
"close": "fun close(channel: Any): Unit",
|
||||
"panic": "fun panic(value: Any): Unit",
|
||||
"recover": "fun recover(): Any",
|
||||
"string": "fun string(value: Any): String",
|
||||
"int": "fun int(value: Any): Int",
|
||||
"float64": "fun float64(value: Any): Double",
|
||||
"bool": "fun bool(value: Any): Boolean",
|
||||
"sql": "typed PostgreSQL query DSL",
|
||||
"set": "fun set(target: Any, value: Any): Unit",
|
||||
"now": "fun now(): time.Time",
|
||||
"runBlocking": "fun runBlocking(block: suspend () -> Unit): Unit",
|
||||
"coroutineScope": "suspend fun coroutineScope(block: suspend () -> Unit): Unit",
|
||||
"launch": "suspend fun launch(block: suspend () -> Unit): Unit",
|
||||
"async": "suspend fun async<T>(block: suspend () -> T): Deferred<T>",
|
||||
"delay": "suspend fun delay(ms: Int): Unit",
|
||||
"withTimeout": "suspend fun withTimeout(ms: Int, block: suspend () -> Unit): Unit",
|
||||
"isActive": "suspend fun isActive(): Boolean",
|
||||
"println": "fun println(value: Any): Unit",
|
||||
"runCatching": "fun runCatching(block: () -> Unit): Result",
|
||||
"Channel": "fun Channel<T>(capacity: Int = 0): Channel<T>",
|
||||
"listOf": "fun listOf<T>(values: T...): List<T>",
|
||||
"mutableListOf": "fun mutableListOf<T>(values: T...): MutableList<T>",
|
||||
"mapOf": "fun mapOf<K, V>(pairs: Any...): Map<K, V>",
|
||||
"mutableMapOf": "fun mutableMapOf<K, V>(pairs: Any...): MutableMap<K, V>",
|
||||
"ByteSlice": "fun ByteSlice(value: String | Int): ByteSlice",
|
||||
"append": "fun append<T>(values: List<T>, value: T): List<T>",
|
||||
"keys": "fun keys<K, V>(values: Map<K, V>): List<K>",
|
||||
"goAssert": "fun goAssert<T>(value: Any): T",
|
||||
"len": "fun len(value: Any): Int",
|
||||
"cap": "fun cap(value: Any): Int",
|
||||
"make": "fun make<T>(size: Int): T",
|
||||
"new": "fun new<T>(): *T",
|
||||
"copy": "fun copy(target: Any, source: Any): Int",
|
||||
"delete": "fun delete(map: Any, key: Any): Unit",
|
||||
"close": "fun close(channel: Any): Unit",
|
||||
"panic": "fun panic(value: Any): Unit",
|
||||
"recover": "fun recover(): Any",
|
||||
"string": "fun string(value: Any): String",
|
||||
"int": "fun int(value: Any): Int",
|
||||
"float64": "fun float64(value: Any): Double",
|
||||
"bool": "fun bool(value: Any): Boolean",
|
||||
"sql": "typed PostgreSQL query DSL",
|
||||
"set": "fun set(target: Any, value: Any): Unit",
|
||||
"now": "fun now(): time.Time",
|
||||
"runBlocking": "fun runBlocking(block: () -> Unit): Unit",
|
||||
"coroutineScope": "contextual fun coroutineScope(block: () -> Unit): Unit",
|
||||
"launch": "contextual fun launch(block: () -> Unit): Unit",
|
||||
"async": "contextual fun async<T>(block: () -> T): Deferred<T>",
|
||||
"delay": "contextual fun delay(ms: Int): Unit",
|
||||
"withTimeout": "contextual fun withTimeout(ms: Int, block: () -> Unit): Unit",
|
||||
"isActive": "contextual fun isActive(): Boolean",
|
||||
"coroutineContext": "contextual fun coroutineContext(): context.Context",
|
||||
}
|
||||
|
||||
func contains(values []string, needle string) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue