diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/Renderers.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/Renderers.java index c4ad257f721..39e8ec68997 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/Renderers.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/rendering/Renderers.java @@ -421,7 +421,7 @@ public class Renderers { " that cannot be satisfied capturing 'in' projection"; } else { - explanation = "Only top level type projections can be captured"; + explanation = "Only top-level type projections can be captured"; } result.text(newText().normal("'" + typeParameterWithCapturedConstraint.getName() + "'" + " cannot capture " + diff --git a/core/descriptors/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemStatus.kt b/core/descriptors/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemStatus.kt index 793fdf67415..bc7dcd0b141 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemStatus.kt +++ b/core/descriptors/src/org/jetbrains/jet/lang/resolve/calls/inference/ConstraintSystemStatus.kt @@ -86,6 +86,11 @@ public trait ConstraintSystemStatus { */ public fun hasErrorInConstrainingTypes(): Boolean - //todo comment + /** + * Returns true if a user type contains the type projection that cannot be captured. + * + * For example, for
fun <T> foo(t: Array<Array<T>>) {}
+ * in invocation foo(array) where array has type Array<Array<out Int>>. + */ public fun hasCannotCaptureTypesError(): Boolean } \ No newline at end of file