[NI] Relax requirement for stub types in builder-inference
For functions with implicit return type annotations will be replaced anyway in order to initialize return type, so this restriction in `StubType` was too strong #KT-30656 Fixed
This commit is contained in:
@@ -24,9 +24,7 @@ class StubType(
|
||||
override val annotations: Annotations
|
||||
get() = Annotations.EMPTY
|
||||
|
||||
override fun replaceAnnotations(newAnnotations: Annotations): SimpleType {
|
||||
error("Shouldn't be called on non-fixed type")
|
||||
}
|
||||
override fun replaceAnnotations(newAnnotations: Annotations): SimpleType = this
|
||||
|
||||
override fun makeNullableAsSpecified(newNullability: Boolean): SimpleType {
|
||||
return if (newNullability == isMarkedNullable)
|
||||
|
||||
Reference in New Issue
Block a user