fix stupid bug introduced during refactoring
This commit is contained in:
@@ -1504,7 +1504,6 @@ public class ExpressionCodegen extends JetVisitor {
|
|||||||
throw new UnsupportedOperationException("don't know how to handle non-class types in as/as?");
|
throw new UnsupportedOperationException("don't know how to handle non-class types in as/as?");
|
||||||
}
|
}
|
||||||
Type type = typeMapper.mapType(jetType, OwnerKind.INTERFACE);
|
Type type = typeMapper.mapType(jetType, OwnerKind.INTERFACE);
|
||||||
gen(expression.getLeft(), OBJECT_TYPE);
|
|
||||||
generateInstanceOf(new Runnable() {
|
generateInstanceOf(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import java.io.*
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
val reader = new BufferedReader(new InputStreamReader(System.`in`))
|
||||||
|
while(true) {
|
||||||
|
val cmd = reader.readLine() as String
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -79,6 +79,11 @@ public class TypeInfoTest extends CodegenTestCase {
|
|||||||
assertNull(foo.invoke(null));
|
assertNull(foo.invoke(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testAsInLoop() throws Exception {
|
||||||
|
loadFile();
|
||||||
|
generateFunction(); // assert no exception
|
||||||
|
}
|
||||||
|
|
||||||
private Runnable newRunnable() {
|
private Runnable newRunnable() {
|
||||||
return new Runnable() {
|
return new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user