Add support for check diagnostic parameters in test.

This commit is contained in:
Stanislav Erokhin
2014-09-09 15:54:32 +04:00
parent 5a192f58ea
commit caf44969a4
6 changed files with 630 additions and 60 deletions
@@ -0,0 +1,15 @@
fun foo(<!UNUSED_PARAMETER(IGNORE)!>u<!> : Unit) : Int = 1
fun test() : Int {
foo(<!CONSTANT_EXPECTED_TYPE_MISMATCH(IGNORE; kotlin.Unit)!>1<!>)
val <!UNUSED_VARIABLE!>a<!> : () -> Unit = {
foo(<!CONSTANT_EXPECTED_TYPE_MISMATCH(integer; IGNORE)!>1<!>)
}
return 1 <!NONE_APPLICABLE!>-<!> "1"
}
class A() {
val x : Int = <!TYPE_MISMATCH!>foo1(<!UNRESOLVED_REFERENCE, TOO_MANY_ARGUMENTS!>xx<!>)<!>
}
fun foo1() {}
@@ -0,0 +1,295 @@
DescriptorResolver@0 {
<name not found> = null
}
LazyJavaPackageFragmentProvider@1 {
packageFragments('<root>': FqName@2) = LazyJavaPackageFragment@3['<root>']
packageFragments('A': FqName@4) = null
packageFragments('Int': FqName@5) = null
packageFragments('Unit': FqName@6) = null
packageFragments('java': FqName@7) = LazyJavaPackageFragment@8['java']
packageFragments('java.lang': FqName@9) = LazyJavaPackageFragment@10['lang']
packageFragments('java.lang.Int': FqName@11) = null
packageFragments('java.lang.Unit': FqName@12) = null
packageFragments('java.lang.xx': FqName@13) = null
packageFragments('kotlin': FqName@14) = null
packageFragments('kotlin.Int': FqName@15) = null
packageFragments('kotlin.Unit': FqName@16) = null
packageFragments('kotlin.io': FqName@17) = null
packageFragments('kotlin.jvm': FqName@18) = null
packageFragments('kotlin.xx': FqName@19) = null
packageFragments('xx': FqName@20) = null
}
LazyJavaPackageFragment@3['<root>'] {
classes('Int': Name@21) = null // through LazyPackageFragmentScopeForJavaPackage@22
classes('Unit': Name@23) = null // through LazyPackageFragmentScopeForJavaPackage@22
classes('foo': Name@24) = null // through LazyPackageFragmentScopeForJavaPackage@22
classes('foo1': Name@25) = null // through LazyPackageFragmentScopeForJavaPackage@22
classes('minus': Name@26) = null // through LazyPackageFragmentScopeForJavaPackage@22
classes('xx': Name@27) = null // through LazyPackageFragmentScopeForJavaPackage@22
deserializedPackageScope = Empty@28 // through LazyPackageFragmentScopeForJavaPackage@22
functions('foo': Name@24) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@22
functions('foo1': Name@25) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@22
functions('minus': Name@26) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@22
functions('xx': Name@30) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@22
memberIndex = computeMemberIndex$1@31 // through LazyPackageFragmentScopeForJavaPackage@22
}
LazyJavaPackageFragment@8['java'] {
classes('lang': Name@32) = null // through LazyPackageFragmentScopeForJavaPackage@33
deserializedPackageScope = Empty@28 // through LazyPackageFragmentScopeForJavaPackage@33
functions('lang': Name@34) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@33
memberIndex = computeMemberIndex$1@35 // through LazyPackageFragmentScopeForJavaPackage@33
}
LazyJavaPackageFragment@10['lang'] {
classes('foo': Name@24) = null // through LazyPackageFragmentScopeForJavaPackage@36
classes('foo1': Name@25) = null // through LazyPackageFragmentScopeForJavaPackage@36
classes('minus': Name@26) = null // through LazyPackageFragmentScopeForJavaPackage@36
classes('xx': Name@27) = null // through LazyPackageFragmentScopeForJavaPackage@36
deserializedPackageScope = Empty@28 // through LazyPackageFragmentScopeForJavaPackage@36
functions('foo': Name@24) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@36
functions('foo1': Name@25) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@36
functions('minus': Name@26) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@36
functions('xx': Name@30) = EmptyList@29[empty] // through LazyPackageFragmentScopeForJavaPackage@36
memberIndex = computeMemberIndex$1@37 // through LazyPackageFragmentScopeForJavaPackage@36
}
ResolutionTaskHolder@38 {
<name not found> = ArrayList@39[1] { ResolutionCandidate@40 }
<name not found> = ArrayList@41[1] { ResolutionCandidate@40 }
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
}
ResolutionTaskHolder@42 {
<name not found> = ArrayList@43[1] { ResolutionCandidate@44 }
<name not found> = ArrayList@45[1] { ResolutionCandidate@44 }
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
}
ResolutionTaskHolder@46 {
<name not found> = ArrayList@47[1] { ResolutionCandidate@48 }
<name not found> = ArrayList@49[1] { ResolutionCandidate@48 }
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
}
ResolutionTaskHolder@50 {
<name not found> = ArrayList@51[8] { ResolutionCandidate@52, ResolutionCandidate@53, ResolutionCandidate@54, ... }
<name not found> = ArrayList@55[8] { ResolutionCandidate@52, ResolutionCandidate@53, ResolutionCandidate@54, ... }
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
}
ResolutionTaskHolder@56 {
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
}
ResolutionTaskHolder@57 {
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
<name not found> = EmptyList@29[empty]
}
@@ -0,0 +1,13 @@
package
internal fun foo(/*0*/ u: kotlin.Unit): kotlin.Int
internal fun foo1(): kotlin.Unit
internal fun test(): kotlin.Int
internal final class A {
public constructor A()
internal final val x: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}