added position strategy to NOTHING_TO_INLINE error
This commit is contained in:
@@ -574,7 +574,7 @@ public interface Errors {
|
||||
//Inline and inlinable parameters
|
||||
DiagnosticFactory2<JetElement, DeclarationDescriptor, DeclarationDescriptor> INVISIBLE_MEMBER_FROM_INLINE = DiagnosticFactory2.create(ERROR, CALL_ELEMENT);
|
||||
DiagnosticFactory2<JetElement, JetNamedDeclaration, DeclarationDescriptor> NOT_YET_SUPPORTED_IN_INLINE = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory1<JetElement, DeclarationDescriptor> NOTHING_TO_INLINE = DiagnosticFactory1.create(WARNING);
|
||||
DiagnosticFactory1<JetFunction, DeclarationDescriptor> NOTHING_TO_INLINE = DiagnosticFactory1.create(WARNING, NAMED_ELEMENT);
|
||||
DiagnosticFactory2<JetElement, JetExpression, DeclarationDescriptor> USAGE_IS_NOT_INLINABLE = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<JetElement, JetElement, DeclarationDescriptor> NULLABLE_INLINE_PARAMETER = DiagnosticFactory2.create(ERROR);
|
||||
DiagnosticFactory2<JetElement, JetElement, DeclarationDescriptor> RECURSION_IN_INLINE = DiagnosticFactory2.create(ERROR);
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NULLABLE_INLINE_PARAMETER
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline fun test() {
|
||||
<!NOTHING_TO_INLINE!>inline fun test()<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
inline fun test2(s : (Int) -> Int) {
|
||||
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline fun test3(noinline s : (Int) -> Int) {
|
||||
<!NOTHING_TO_INLINE!>inline fun test3(noinline s : (Int) -> Int)<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline fun test4(noinline s : Int.() -> Int) {
|
||||
<!NOTHING_TO_INLINE!>inline fun test4(noinline s : Int.() -> Int)<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline fun Function1<Int, Int>?.test5() {
|
||||
<!NOTHING_TO_INLINE!>inline fun Function1<Int, Int>?.test5()<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline fun Function1<Int, Int>?.test6() {
|
||||
<!NOTHING_TO_INLINE!>inline fun Function1<Int, Int>?.test6()<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline fun test2(s : ((Int) -> Int)?) {
|
||||
<!NOTHING_TO_INLINE!>inline fun test2(s : ((Int) -> Int)?)<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
@@ -12,10 +12,10 @@ public inline fun <T> submitNoInline(noinline action: Function1<Int, Int>?, s: (
|
||||
action?.invoke(10)
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>public inline fun <T> <!NULLABLE_INLINE_PARAMETER!>Function1<Int, Int>?<!>.submit() {
|
||||
<!NOTHING_TO_INLINE!>public inline fun <T> <!NULLABLE_INLINE_PARAMETER!>Function1<Int, Int>?<!>.submit()<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>public inline fun <T> submit(<!NULLABLE_INLINE_PARAMETER!>action: Function1<Int, Int>?<!>) {
|
||||
<!NOTHING_TO_INLINE!>public inline fun <T> submit(<!NULLABLE_INLINE_PARAMETER!>action: Function1<Int, Int>?<!>)<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
Reference in New Issue
Block a user