New: Add builder for FunSpec which accepts a MemberName (#1574).
Fix: Omit public modifier on override function or constructor parameters (#1550).
Fix: Correct handling of members in various types (#1558).
Fix: Function return types now default to Unit unless explicitly set (#1559).
Previously the default was null which behaved like Unit for block bodies. When an expression body was produced,
however, no return type would be emitted. This meant that the return type was implicit based on the contents of
the body.
With this change, when no return type is specified and an expression body is produced, the return type will be
explicitly Unit. Specify the actual return type explicitly to correct the output.
Old versions:
val funSpec = FunSpec.builder("foo")
.addStatement("return 1")
.build()
public fun foo() = 1
This version, incorrect:
val funSpec = FunSpec.builder("foo")
.addStatement("return 1")
.build()
public fun foo(): Unit = 1 // ❌
This version, correct:
val funSpec = FunSpec.builder("foo")
+ .returns(INT)
.addStatement("return 1")
.build()
New: Add builder for FunSpec which accepts a MemberName (#1574).
Fix: Omit public modifier on override function or constructor parameters (#1550).
Fix: Correct handling of members in various types (#1558).
Fix: Function return types now default to Unit unless explicitly set (#1559).
Previously the default was null which behaved like Unit for block bodies. When an expression body was produced,
however, no return type would be emitted. This meant that the return type was implicit based on the contents of
the body.
With this change, when no return type is specified and an expression body is produced, the return type will be
explicitly Unit. Specify the actual return type explicitly to correct the output.
Old versions:
val funSpec = FunSpec.builder("foo")
.addStatement("return 1")
.build()
public fun foo() = 1
This version, incorrect:
val funSpec = FunSpec.builder("foo")
.addStatement("return 1")
.build()
public fun foo(): Unit = 1 // ❌
This version, correct:
val funSpec = FunSpec.builder("foo")
+ .returns(INT)
.addStatement("return 1")
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps com.squareup:kotlinpoet from 1.13.0 to 1.14.0.
Release notes
Sourced from com.squareup:kotlinpoet's releases.
... (truncated)
Changelog
Sourced from com.squareup:kotlinpoet's changelog.
... (truncated)
Commits
a9917e7
Prepare for release 1.14.02c3dbb8
Merge pull request #1575 from drawers/fix/1525cf2e019
Update dependency com.google.guava:guava to v32 (#1577)2ba85bf
Add usage of STAR (#1572)1a02180
Add builder for FunSpec which accepts a MemberName (#1574)95e0e58
Update plugin kotlinBinaryCompatibilityValidator to v0.13.1 (#1479)3c5eed5
Update Kotlin and KSP (#1569)1c353cf
Fix #152515faa4e
Update dependency mkdocs-macros-plugin to v1615341c
Extract trait interface for documentable constructs and their builders (#1571)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)