Add intentions to convert lazy <--> ordinary property

#KT-23501 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-04-17 10:02:02 +03:00
committed by Mikhail Glukhikh
parent a2205cfc98
commit fbd992f8c7
55 changed files with 280 additions and 0 deletions
@@ -1,5 +1,6 @@
// "Add annotation target" "false"
// WITH_RUNTIME
// ACTION: Convert to ordinary property
// ACTION: Introduce import alias
// ACTION: Make internal
// ACTION: Make private
@@ -1,5 +1,6 @@
// "Add annotation target" "false"
// WITH_RUNTIME
// ACTION: Convert to ordinary property
// ACTION: Introduce import alias
// ACTION: Make internal
// ACTION: Make private
+1
View File
@@ -1,4 +1,5 @@
// "Add non-null asserted (!!) call" "false"
// ACTION: Convert to lazy property
// ACTION: Add 'const' modifier
// ACTION: Add 'toString()' call
// ACTION: Change type of 'x' to 'String?'
@@ -1,4 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create class 'SomeTest'
// ACTION: Rename reference
@@ -1,6 +1,7 @@
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ERROR: Unresolved reference: SomeTest
// ERROR: Expression expected, but a package name found
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create class 'SomeTest'
// ACTION: Replace safe access expression with 'if' expression
@@ -1,4 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create class 'SomeClass'
// ACTION: Create function 'SomeClass'
@@ -1,4 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create class 'ExcludedClass'
// ACTION: Create function 'ExcludedClass'
@@ -1,4 +1,5 @@
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create function 'someFunction'
// ACTION: Rename reference
@@ -1,4 +1,5 @@
// "Create local variable 'foo'" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create parameter 'foo'
// ACTION: Create property 'foo'
@@ -1,4 +1,5 @@
// "Create local variable 'foo'" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create property 'foo'
// ACTION: Rename reference
@@ -1,4 +1,5 @@
// "Create parameter 'foo'" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create property 'foo'
// ACTION: Rename reference
@@ -1,4 +1,5 @@
// "Create parameter 'foo'" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create property 'foo'
// ACTION: Rename reference
@@ -1,4 +1,5 @@
// "Create parameter 'foo'" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Create property 'foo'
// ACTION: Rename reference
@@ -1,4 +1,5 @@
// "Make bar internal" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Add names to call arguments
// ACTION: Move to constructor
@@ -1,4 +1,5 @@
// "Make 'MyClass' open" "false"
// ACTION: Convert to lazy property
// ACTION: Make 'y' not open
// ACTION: Add 'const' modifier
// ACTION: Make internal
+1
View File
@@ -1,4 +1,5 @@
// "Make bar suspend" "false"
// ACTION: Convert to lazy property
// ACTION: Convert property initializer to getter
// ACTION: Introduce import alias
// ERROR: Suspend function 'foo' should be called only from a coroutine or another suspend function
@@ -1,6 +1,7 @@
// "Replace '@JvmField' with 'const'" "false"
// WITH_RUNTIME
// ERROR: JvmField has no effect on a private property
// ACTION: Convert to lazy property
// ACTION: Make internal
// ACTION: Make protected
// ACTION: Make public
@@ -1,6 +1,7 @@
// "Replace '@JvmField' with 'const'" "false"
// WITH_RUNTIME
// ERROR: JvmField has no effect on a private property
// ACTION: Convert to lazy property
// ACTION: Make internal
// ACTION: Make public
// ACTION: Remove explicit type specification
@@ -1,6 +1,7 @@
// "Replace '@JvmField' with 'const'" "false"
// WITH_RUNTIME
// ERROR: JvmField has no effect on a private property
// ACTION: Convert to lazy property
// ACTION: Make internal
// ACTION: Make public
// ACTION: Remove explicit type specification
@@ -1,6 +1,7 @@
// "Replace '@JvmField' with 'const'" "false"
// WITH_RUNTIME
// ERROR: JvmField has no effect on a private property
// ACTION: Convert to lazy property
// ACTION: Add 'const' modifier
// ACTION: Make internal
// ACTION: Make public
@@ -1,5 +1,6 @@
// "Typo: Change to..." "false"
// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection
// ACTION: Convert to lazy property
// ACTION: Add 'const' modifier
// ACTION: Convert property initializer to getter
// ACTION: To raw string literal
+1
View File
@@ -1,6 +1,7 @@
// "Cast expression '1' to 'UInt'" "false"
// WITH_RUNTIME
// ERROR: Conversion of signed constants to unsigned ones is prohibited
// ACTION: Convert to lazy property
// ACTION: Change parameter 'u' type of function 'takeUInt' to 'Int'
// ACTION: Convert property initializer to getter
// ACTION: Change to '1u'
@@ -1,4 +1,5 @@
// "Change to '1'" "false"
// ACTION: Convert to lazy property
// ACTION: Add 'const' modifier
// ACTION: Change type of 'a' to 'Double'
// ACTION: Convert expression to 'Int'
@@ -1,4 +1,5 @@
// "Change to '10000000000000000000L'" "false"
// ACTION: Convert to lazy property
// ACTION: Add 'const' modifier
// ACTION: Change type of 'a' to 'Double'
// ACTION: Convert expression to 'Long'
@@ -1,4 +1,5 @@
// "Change to '65000'" "false"
// ACTION: Convert to lazy property
// ACTION: Add 'const' modifier
// ACTION: Change type of 'a' to 'Double'
// ACTION: Convert expression to 'Short'