Fix return type for ActiveDataTree.kt

This commit is contained in:
Alexander Nozik 2021-01-31 20:55:01 +03:00
parent 0e053ab78d
commit e66ae408cd
2 changed files with 42 additions and 2 deletions

40
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Bintray Publish
on:
release:
types:
- created
jobs:
build-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle clean
run: ./gradlew clean
- name: Gradle build
run: ./gradlew build
- name: Run release task
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
build-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle clean
run: ./gradlew clean
- name: Gradle build
run: ./gradlew build
- name: Run release task
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}

View File

@ -94,7 +94,7 @@ public class ActiveDataTree<T : Any>(
public suspend fun <T : Any> ActiveDataTree(
type: KClass<out T>,
block: suspend ActiveDataTree<T>.() -> Unit,
): DataTree<T> {
): ActiveDataTree<T> {
val tree = ActiveDataTree(type)
tree.block()
return tree
@ -103,7 +103,7 @@ public suspend fun <T : Any> ActiveDataTree(
@Suppress("FunctionName")
public suspend inline fun <reified T : Any> ActiveDataTree(
crossinline block: suspend ActiveDataTree<T>.() -> Unit,
): DataTree<T> = ActiveDataTree(T::class).apply { block() }
): ActiveDataTree<T> = ActiveDataTree(T::class).apply { block() }
public suspend inline fun <reified T : Any> ActiveDataTree<T>.emit(