Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
0fd88274
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0fd88274
编写于
5月 23, 2012
作者:
S
Svetlana Isakova
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
function invocation with only type parameters prohibited
上级
327b471e
变更
22
显示空白变更内容
内联
并排
Showing
22 changed file
with
78 addition
and
47 deletion
+78
-47
compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java
...ontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java
+1
-1
compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java
...jetbrains/jet/lang/diagnostics/PositioningStrategies.java
+24
-0
compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java
.../lang/types/expressions/BasicExpressionTypingVisitor.java
+16
-8
compiler/testData/codegen/classes/initializerBlockDImpl.jet
compiler/testData/codegen/classes/initializerBlockDImpl.jet
+1
-1
compiler/testData/codegen/regressions/kt581.jet
compiler/testData/codegen/regressions/kt581.jet
+1
-1
compiler/testData/codegen/typeInfo/inner.jet
compiler/testData/codegen/typeInfo/inner.jet
+1
-1
compiler/testData/diagnostics/tests/Bounds.jet
compiler/testData/diagnostics/tests/Bounds.jet
+3
-3
compiler/testData/diagnostics/tests/ResolveToJava.jet
compiler/testData/diagnostics/tests/ResolveToJava.jet
+3
-3
compiler/testData/diagnostics/tests/alt-headers/ArrayListAndMap.jet
...estData/diagnostics/tests/alt-headers/ArrayListAndMap.jet
+2
-2
compiler/testData/diagnostics/tests/alt-headers/ArrayListClone.jet
...testData/diagnostics/tests/alt-headers/ArrayListClone.jet
+1
-1
compiler/testData/diagnostics/tests/alt-headers/ArrayListToArray.jet
...stData/diagnostics/tests/alt-headers/ArrayListToArray.jet
+1
-1
compiler/testData/diagnostics/tests/j+k/UnboxingNulls.jet
compiler/testData/diagnostics/tests/j+k/UnboxingNulls.jet
+1
-1
compiler/testData/diagnostics/tests/regressions/Jet72.jet
compiler/testData/diagnostics/tests/regressions/Jet72.jet
+1
-1
compiler/testData/diagnostics/tests/regressions/OutProjections.jet
...testData/diagnostics/tests/regressions/OutProjections.jet
+2
-2
compiler/testData/diagnostics/tests/regressions/kt580.jet
compiler/testData/diagnostics/tests/regressions/kt580.jet
+1
-1
compiler/testData/diagnostics/tests/regressions/kt701.jet
compiler/testData/diagnostics/tests/regressions/kt701.jet
+2
-2
compiler/testData/diagnostics/tests/regressions/kt716.jet
compiler/testData/diagnostics/tests/regressions/kt716.jet
+2
-2
compiler/testData/diagnostics/tests/subtyping/kt-1457.jet
compiler/testData/diagnostics/tests/subtyping/kt-1457.jet
+1
-1
idea/src/org/jetbrains/jet/plugin/quickfix/ChangeToFunctionInvocationFix.java
...ns/jet/plugin/quickfix/ChangeToFunctionInvocationFix.java
+8
-9
idea/testData/checker/BoundsWithSubstitutors.jet
idea/testData/checker/BoundsWithSubstitutors.jet
+3
-3
idea/testData/checker/ResolveToJava.jet
idea/testData/checker/ResolveToJava.jet
+2
-2
idea/testData/checker/regression/Jet72.jet
idea/testData/checker/regression/Jet72.jet
+1
-1
未找到文件。
compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java
浏览文件 @
0fd88274
...
...
@@ -321,7 +321,7 @@ public interface Errors {
DiagnosticFactory2
<
JetDeclaration
,
CallableMemberDescriptor
,
String
>
CONFLICTING_OVERLOADS
=
DiagnosticFactory2
.
create
(
ERROR
,
DECLARATION
);
DiagnosticFactory2
<
JetReferenceExpression
,
JetExpression
,
JetType
>
FUNCTION_EXPECTED
=
DiagnosticFactory2
.
create
(
ERROR
);
DiagnosticFactory2
<
Jet
ReferenceExpression
,
JetExpression
,
Boolean
>
FUNCTION_CALL_EXPECTED
=
DiagnosticFactory2
.
create
(
ERROR
);
DiagnosticFactory2
<
Jet
Expression
,
JetExpression
,
Boolean
>
FUNCTION_CALL_EXPECTED
=
DiagnosticFactory2
.
create
(
ERROR
,
CALL_EXPRESSION
);
DiagnosticFactory3
<
JetExpression
,
String
,
JetType
,
JetType
>
RESULT_TYPE_MISMATCH
=
DiagnosticFactory3
.
create
(
ERROR
);
DiagnosticFactory3
<
JetReferenceExpression
,
String
,
String
,
String
>
UNSAFE_INFIX_CALL
=
DiagnosticFactory3
.
create
(
ERROR
);
...
...
compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/PositioningStrategies.java
浏览文件 @
0fd88274
...
...
@@ -298,4 +298,28 @@ public class PositioningStrategies {
return
markNode
(
element
.
getQuestionMarkNode
());
}
};
public
static
PositioningStrategy
<
JetExpression
>
CALL_EXPRESSION
=
new
PositioningStrategy
<
JetExpression
>()
{
@NotNull
@Override
public
List
<
TextRange
>
mark
(
@NotNull
JetExpression
element
)
{
if
(
element
instanceof
JetCallExpression
)
{
JetCallExpression
callExpression
=
(
JetCallExpression
)
element
;
PsiElement
endElement
;
JetTypeArgumentList
typeArgumentList
=
callExpression
.
getTypeArgumentList
();
JetExpression
calleeExpression
=
callExpression
.
getCalleeExpression
();
if
(
typeArgumentList
!=
null
)
{
endElement
=
typeArgumentList
;
}
else
if
(
calleeExpression
!=
null
)
{
endElement
=
calleeExpression
;
}
else
{
endElement
=
element
;
}
return
markRange
(
new
TextRange
(
element
.
getTextRange
().
getStartOffset
(),
endElement
.
getTextRange
().
getEndOffset
()));
}
return
super
.
mark
(
element
);
}
};
}
\ No newline at end of file
compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java
浏览文件 @
0fd88274
...
...
@@ -77,6 +77,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
return
type
;
// TODO : Extensions to this
}
@Nullable
private
JetType
lookupNamespaceOrClassObject
(
JetSimpleNameExpression
expression
,
Name
referencedName
,
ExpressionTypingContext
context
)
{
ClassifierDescriptor
classifier
=
context
.
scope
.
getClassifier
(
referencedName
);
if
(
classifier
!=
null
)
{
...
...
@@ -90,9 +91,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
context
.
trace
.
report
(
NO_CLASS_OBJECT
.
on
(
expression
,
classifier
));
}
context
.
trace
.
record
(
REFERENCE_TARGET
,
expression
,
classifier
);
if
(
result
==
null
)
{
return
ErrorUtils
.
createErrorType
(
"No class object in "
+
expression
.
getReferencedName
());
}
//
if (result == null) {
//
return ErrorUtils.createErrorType("No class object in " + expression.getReferencedName());
//
}
return
DataFlowUtils
.
checkType
(
result
,
expression
,
context
);
}
}
...
...
@@ -684,7 +685,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
if
(
result
[
0
])
{
traceForFunction
.
commit
();
boolean
hasValueParameters
=
functionDescriptor
==
null
||
functionDescriptor
.
getValueParameters
().
size
()
>
0
;
context
.
trace
.
report
(
Errors
.
FUNCTION_CALL_EXPECTED
.
on
(
nameExpression
,
nameExpression
,
hasValueParameters
));
context
.
trace
.
report
(
FUNCTION_CALL_EXPECTED
.
on
(
nameExpression
,
nameExpression
,
hasValueParameters
));
return
functionDescriptor
!=
null
?
functionDescriptor
.
getReturnType
()
:
null
;
}
...
...
@@ -704,17 +705,23 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
context
.
replaceBindingTrace
(
traceForFunction
),
result
);
if
(
result
[
0
])
{
traceForFunction
.
commit
();
if
(
callExpression
.
getValueArgumentList
()
==
null
&&
callExpression
.
getFunctionLiteralArguments
().
isEmpty
())
{
// there are only type arguments
boolean
hasValueParameters
=
functionDescriptor
==
null
||
functionDescriptor
.
getValueParameters
().
size
()
>
0
;
context
.
trace
.
report
(
FUNCTION_CALL_EXPECTED
.
on
(
callExpression
,
callExpression
,
hasValueParameters
));
}
return
functionDescriptor
!=
null
?
functionDescriptor
.
getReturnType
()
:
null
;
}
JetExpression
calleeExpression
=
callExpression
.
getCalleeExpression
();
if
(
calleeExpression
instanceof
JetSimpleNameExpression
)
{
if
(
calleeExpression
instanceof
JetSimpleNameExpression
&&
callExpression
.
getTypeArgumentList
()
==
null
)
{
TemporaryBindingTrace
traceForVariable
=
TemporaryBindingTrace
.
create
(
context
.
trace
);
JetType
type
=
getVariableType
((
JetSimpleNameExpression
)
calleeExpression
,
receiver
,
callOperationNode
,
context
.
replaceBindingTrace
(
traceForVariable
),
result
);
if
(
result
[
0
])
{
traceForVariable
.
commit
();
context
.
trace
.
report
(
Errors
.
FUNCTION_EXPECTED
.
on
((
JetReferenceExpression
)
calleeExpression
,
callExpression
,
type
!=
null
?
type
:
ErrorUtils
.
createErrorType
(
""
)));
context
.
trace
.
report
(
FUNCTION_EXPECTED
.
on
((
JetReferenceExpression
)
calleeExpression
,
calleeExpression
,
type
!=
null
?
type
:
ErrorUtils
.
createErrorType
(
""
)));
return
null
;
}
}
...
...
@@ -722,7 +729,8 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
return
null
;
}
private
static
void
checkSuper
(
@NotNull
ReceiverDescriptor
receiverDescriptor
,
@NotNull
OverloadResolutionResults
<?
extends
CallableDescriptor
>
results
,
@NotNull
BindingTrace
trace
,
@NotNull
JetExpression
expression
)
{
private
static
void
checkSuper
(
@NotNull
ReceiverDescriptor
receiverDescriptor
,
@NotNull
OverloadResolutionResults
<?
extends
CallableDescriptor
>
results
,
@NotNull
BindingTrace
trace
,
@NotNull
JetExpression
expression
)
{
if
(!
results
.
isSingleResult
())
return
;
if
(!(
receiverDescriptor
instanceof
ExpressionReceiver
))
return
;
JetExpression
receiver
=
((
ExpressionReceiver
)
receiverDescriptor
).
getExpression
();
...
...
compiler/testData/codegen/classes/initializerBlockDImpl.jet
浏览文件 @
0fd88274
...
...
@@ -2,7 +2,7 @@ import java.util.*
import java.io.*
class World() {
public val items: ArrayList<Item> = ArrayList<Item>
public val items: ArrayList<Item> = ArrayList<Item>
()
class Item() {
{
...
...
compiler/testData/codegen/regressions/kt581.jet
浏览文件 @
0fd88274
...
...
@@ -11,7 +11,7 @@ fun box() : String {
//
val
vals
=
iarray
(
789
,
678
,
567
,
456
,
345
,
234
,
123
,
012
)
val
vals
=
iarray
(
789
,
678
,
567
,
456
,
345
,
234
,
123
,
12
)
val
diffs
=
HashSet
<
Int
>
val
diffs
=
HashSet
<
Int
>
()
for
(
i
in
vals
.
indices
)
for
(
j
in
i
..
vals
.
lastIndex
())
diffs
.
add
(
vals
[
i
]
-
vals
[
j
])
...
...
compiler/testData/codegen/typeInfo/inner.jet
浏览文件 @
0fd88274
...
...
@@ -10,5 +10,5 @@ class Box<T>() {
}
fun box(): String {
return Box<String>.inner().isT("OK")
return Box<String>
()
.inner().isT("OK")
}
compiler/testData/diagnostics/tests/Bounds.jet
浏览文件 @
0fd88274
...
...
@@ -10,9 +10,9 @@ package boundsWithSubstitutors
class
X
<
A
,
B
:
A
>()
val
b
=
X
<
Any
,
X
<
A
<
C
>,
C
>>
val
b0
=
X
<
Any
,
<
!UPPER_BOUND_VIOLATED!>Any?<!>>
val
b1
=
X
<
Any
,
X
<
A
<
C
>,
<
!UPPER_BOUND_VIOLATED!>String<!>>>
val
b
=
X
<
Any
,
X
<
A
<
C
>,
C
>>
()
val
b0
=
X
<
Any
,
<
!UPPER_BOUND_VIOLATED!>Any?<!>>
()
val
b1
=
X
<
Any
,
X
<
A
<
C
>,
<
!UPPER_BOUND_VIOLATED!>String<!>>>
()
//
FILE
:
b
.
kt
open
class
A
{}
...
...
compiler/testData/diagnostics/tests/ResolveToJava.jet
浏览文件 @
0fd88274
...
...
@@ -18,8 +18,8 @@ fun test(<!UNUSED_PARAMETER!>l<!> : java.util.List<Int>) {
val
<
!UNUSED_VARIABLE!>f<!> : java.io.File? = null
Collections
.<
!
UNRESOLVED_REFERENCE
!>emptyList<!>
Collections
.
emptyList
<
Int
>
Collections
.<
!
TYPE_INFERENCE_FAILED, FUNCTION_CALL_EXPECTED
!>emptyList<!>
Collections
.
<
!FUNCTION_CALL_EXPECTED!>emptyList<Int><!
>
Collections
.
emptyList
<
Int
>()
Collections
.<
!TYPE_INFERENCE_FAILED!>emptyList()<!>
...
...
compiler/testData/diagnostics/tests/alt-headers/ArrayListAndMap.jet
浏览文件 @
0fd88274
...
...
@@ -4,12 +4,12 @@ package kotlin1
import
java
.
util
.*
fun
main
(
args
:
Array
<
String
>)
{
val
al
:
ArrayList
<
Int
>
=
ArrayList
<
Int
>
val
al
:
ArrayList
<
Int
>
=
ArrayList
<
Int
>
()
val
al1
=
ArrayList
<
Int
>(
1
)
//
for
(
x
in
al1
)
{
//
//
}
val
<
!UNUSED_VARIABLE!>al2<!> = ArrayList<Int>(ArrayList<Int>)
val
<
!UNUSED_VARIABLE!>al2<!> = ArrayList<Int>(ArrayList<Int>
()
)
al
:
RandomAccess
al
.
clear
()
:
Unit
al
.
add
(
1
)
:
Boolean
...
...
compiler/testData/diagnostics/tests/alt-headers/ArrayListClone.jet
浏览文件 @
0fd88274
...
...
@@ -4,6 +4,6 @@ package kotlin1
import
java
.
util
.*
fun
main
(
args
:
Array
<
String
>)
{
val
al
:
ArrayList
<
Int
>
=
ArrayList
<
Int
>
val
al
:
ArrayList
<
Int
>
=
ArrayList
<
Int
>
()
al
.
clone
()
:
Object
//
A
type
mismatch
on
this
line
means
that
alt
-
headers
were
not
loaded
}
compiler/testData/diagnostics/tests/alt-headers/ArrayListToArray.jet
浏览文件 @
0fd88274
...
...
@@ -4,7 +4,7 @@ package kotlin1
import
java
.
util
.*
fun
main
(
args
:
Array
<
String
>)
{
val
al
:
ArrayList
<
Int
>
=
ArrayList
<
Int
>
val
al
:
ArrayList
<
Int
>
=
ArrayList
<
Int
>
()
//
A
type
mismatch
on
this
line
means
that
alt
-
headers
were
not
loaded
al
.
toArray
(
Array
<
Int
>(
3
,
{
1
}))
:
Array
<
Int
>
...
...
compiler/testData/diagnostics/tests/j+k/UnboxingNulls.jet
浏览文件 @
0fd88274
...
...
@@ -9,5 +9,5 @@ package a
fun
foo
()
{
//
If
this
fails
,
it
means
that
we
have
broken
the
rule
that
Java
returns
are
always
nullable
a
.
Test
<
Int
>.
t
()
<
!UNSAFE_INFIX_CALL!>+<!> 1
a
.
Test
<
Int
>
()
.
t
()
<
!UNSAFE_INFIX_CALL!>+<!> 1
}
compiler/testData/diagnostics/tests/regressions/Jet72.jet
浏览文件 @
0fd88274
...
...
@@ -6,7 +6,7 @@ abstract class Item(val room: Object) {
abstract val name : String
}
val items: ArrayList<Item> = ArrayList<Item>
val items: ArrayList<Item> = ArrayList<Item>
()
fun test(room : Object) {
for(val item: Item? in items) {
...
...
compiler/testData/diagnostics/tests/regressions/OutProjections.jet
浏览文件 @
0fd88274
...
...
@@ -3,7 +3,7 @@ class Point() {
class G<T>() {}
fun f<T>(<!UNUSED_PARAMETER!>expression<!> : T) : G<out T> = G<T>
fun f<T>(<!UNUSED_PARAMETER!>expression<!> : T) : G<out T> = G<T>
()
fun foo() : G<Point> {
...
...
@@ -13,7 +13,7 @@ fun foo() : G<Point> {
class Out<out T>() {}
fun fout<T>(<!UNUSED_PARAMETER!>expression<!> : T) : Out<out T> = Out<T>
fun fout<T>(<!UNUSED_PARAMETER!>expression<!> : T) : Out<out T> = Out<T>
()
fun fooout() : Out<Point> {
val p = Point();
...
...
compiler/testData/diagnostics/tests/regressions/kt580.jet
浏览文件 @
0fd88274
...
...
@@ -8,7 +8,7 @@ fun iarray(vararg a : String) = a // BUG
fun
main
()
{
val
vals
=
iarray
(
"789"
,
"678"
,
"567"
)
val
diffs
=
ArrayList
<
Int
>
val
diffs
=
ArrayList
<
Int
>
()
for
(
i
in
vals
.
indices
)
{
for
(
j
in
i
..
vals
.
lastIndex
())
//
Type
inference
failed
diffs
.
add
(
vals
[
i
].
length
-
vals
[
j
].
length
)
...
...
compiler/testData/diagnostics/tests/regressions/kt701.jet
浏览文件 @
0fd88274
...
...
@@ -10,8 +10,8 @@ public class Throwables() {
}
}
public fun propagateIfPossible(throwable : Throwable?) {
propagateIfInstanceOf(throwable, getJavaClass<Error?>) //; Type inference failed: Mismatch while expanding constraints
propagateIfInstanceOf(throwable, getJavaClass<RuntimeException?>) // Type inference failed: Mismatch while expanding constraints
propagateIfInstanceOf(throwable, getJavaClass<Error?>
()
) //; Type inference failed: Mismatch while expanding constraints
propagateIfInstanceOf(throwable, getJavaClass<RuntimeException?>
()
) // Type inference failed: Mismatch while expanding constraints
}
}
}
compiler/testData/diagnostics/tests/regressions/kt716.jet
浏览文件 @
0fd88274
...
...
@@ -9,8 +9,8 @@ fun <T> TypeInfo<T>.getJavaClass() : java.lang.Class<T> {
return <!UNCHECKED_CAST!>t.getClass() as java.lang.Class<T><!> // inferred type is Object but Serializable was expected
}
fun getJavaClass<T>() = typeinfo<T>.getJavaClass()
fun getJavaClass<T>() = typeinfo<T>
()
.getJavaClass()
fun main(args : Array<String>) {
System.out.println(getJavaClass<String>)
System.out.println(getJavaClass<String>
()
)
}
compiler/testData/diagnostics/tests/subtyping/kt-1457.jet
浏览文件 @
0fd88274
...
...
@@ -3,5 +3,5 @@ import java.util.ArrayList
class MyListOfPairs<T> : ArrayList<#(T, T)>() { }
fun test() {
MyListOfPairs<Int> : ArrayList<#(Int, Int)>
MyListOfPairs<Int>
()
: ArrayList<#(Int, Int)>
}
idea/src/org/jetbrains/jet/plugin/quickfix/ChangeToFunctionInvocationFix.java
浏览文件 @
0fd88274
...
...
@@ -22,17 +22,16 @@ import com.intellij.psi.PsiFile;
import
com.intellij.util.IncorrectOperationException
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.jet.lang.diagnostics.Diagnostic
;
import
org.jetbrains.jet.lang.psi.*
;
import
org.jetbrains.jet.lang.psi.JetExpression
;
import
org.jetbrains.jet.lang.psi.JetPsiFactory
;
import
org.jetbrains.jet.plugin.JetBundle
;
import
java.util.List
;
/**
* @author svtk
*/
public
class
ChangeToFunctionInvocationFix
extends
JetIntentionAction
<
Jet
Reference
Expression
>
{
public
class
ChangeToFunctionInvocationFix
extends
JetIntentionAction
<
JetExpression
>
{
public
ChangeToFunctionInvocationFix
(
@NotNull
Jet
Reference
Expression
element
)
{
public
ChangeToFunctionInvocationFix
(
@NotNull
JetExpression
element
)
{
super
(
element
);
}
...
...
@@ -50,16 +49,16 @@ public class ChangeToFunctionInvocationFix extends JetIntentionAction<JetReferen
@Override
public
void
invoke
(
@NotNull
Project
project
,
Editor
editor
,
PsiFile
file
)
throws
IncorrectOperationException
{
Jet
ReferenceExpression
reference
=
(
JetReference
Expression
)
element
.
copy
();
Jet
Expression
reference
=
(
Jet
Expression
)
element
.
copy
();
element
.
replace
(
JetPsiFactory
.
createExpression
(
project
,
reference
.
getText
()
+
"()"
));
}
public
static
JetIntentionActionFactory
createFactory
()
{
return
new
JetIntentionActionFactory
()
{
@Override
public
JetIntentionAction
<
Jet
Reference
Expression
>
createAction
(
Diagnostic
diagnostic
)
{
if
(
diagnostic
.
getPsiElement
()
instanceof
Jet
Reference
Expression
)
{
return
new
ChangeToFunctionInvocationFix
((
Jet
Reference
Expression
)
diagnostic
.
getPsiElement
());
public
JetIntentionAction
<
JetExpression
>
createAction
(
Diagnostic
diagnostic
)
{
if
(
diagnostic
.
getPsiElement
()
instanceof
JetExpression
)
{
return
new
ChangeToFunctionInvocationFix
((
JetExpression
)
diagnostic
.
getPsiElement
());
}
return
null
;
}
...
...
idea/testData/checker/BoundsWithSubstitutors.jet
浏览文件 @
0fd88274
...
...
@@ -8,6 +8,6 @@
class X<A, B : A>()
val b = X<Any, X<A<C>, C>>
val b0 = X<Any, <error>Any?</error>>
val b1 = X<Any, X<A<C>, <error>String</error>>>
val b = X<Any, X<A<C>, C>>
()
val b0 = X<Any, <error>Any?</error>>
()
val b1 = X<Any, X<A<C>, <error>String</error>>>
()
idea/testData/checker/ResolveToJava.jet
浏览文件 @
0fd88274
...
...
@@ -16,8 +16,8 @@ fun test(<warning>l</warning> : java.util.List<Int>) {
val <warning>f</warning> : java.io.File? = null
Collections.<error>
emptyList
</error>
Collections.
emptyList<Int
>
Collections.<error>
<error>emptyList</error>
</error>
Collections.
<error>emptyList<Int></error
>
Collections.emptyList<Int>()
Collections.<error>emptyList()</error>
...
...
idea/testData/checker/regression/Jet72.jet
浏览文件 @
0fd88274
...
...
@@ -6,7 +6,7 @@ abstract class Item(val room: Object) {
abstract val name : String
}
val items: ArrayList<Item> = ArrayList<Item>
val items: ArrayList<Item> = ArrayList<Item>
()
fun test(room : Object) {
for(val item: Item in items) {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录