summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/definitelyNonNullableTypes/changeParameterTypeIsDisabledWhenDnnFeatureIsOff.test
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/definitelyNonNullableTypes/changeParameterTypeIsDisabledWhenDnnFeatureIsOff.test')
-rw-r--r--plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/definitelyNonNullableTypes/changeParameterTypeIsDisabledWhenDnnFeatureIsOff.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/definitelyNonNullableTypes/changeParameterTypeIsDisabledWhenDnnFeatureIsOff.test b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/definitelyNonNullableTypes/changeParameterTypeIsDisabledWhenDnnFeatureIsOff.test
new file mode 100644
index 000000000000..a268152d7094
--- /dev/null
+++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/definitelyNonNullableTypes/changeParameterTypeIsDisabledWhenDnnFeatureIsOff.test
@@ -0,0 +1,18 @@
+// FILE: first.before.kt
+// "Change parameter 'value' type of primary constructor of class 'Derived' to 'T & Any'" "false"
+// LANGUAGE_VERSION: 1.6
+// COMPILER_ARGUMENTS: -Xenhance-type-parameter-types-to-def-not-null
+// ERROR: Type mismatch: inferred type is T but T & Any was expected
+// ACTION: Add 'Any' as upper bound for T to make it non-nullable
+// ACTION: Add names in comment to call arguments
+// ACTION: Add non-null asserted (!!) call
+// ACTION: Cast expression 'value' to 'T & Any'
+
+class Derived<T>(value: T) : Base<T>(<caret>value) {}
+
+// FILE: Base.java
+import org.jetbrains.annotations.NotNull;
+
+public class Base<T> {
+ public Base(@NotNull T value) {}
+}