forbid lambda in conditional inside cast context

This commit is contained in:
Anna Kozlova committed 2014-02-24 18:59:42 +01:00
1 parent 232f8bd465
commit f1b256f416
2 files changed
+2 -1

No files matched your search

@@ -23,5 +23,6 @@ interface II {
class Test1 {
void bar(boolean b){
II ik = b ? (s)-> true : (s)->false;
II ik1 = (II)(b ? <error descr="Lambda expression not expected here">(s)-> true</error> : <error descr="Lambda expression not expected here">(s)->false</error>);
}
}