From 7daf9b53ce874e7f1f7abef448fd489d696c64ab Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Tue, 23 Dec 2014 20:11:58 +0300 Subject: [PATCH] Minor: added a comment --- .../jet/lang/diagnostics/rendering/Renderers.java | 2 +- .../lang/resolve/calls/inference/ConstraintSystemStatus.kt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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