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?");
|
||||
}
|
||||
Type type = typeMapper.mapType(jetType, OwnerKind.INTERFACE);
|
||||
gen(expression.getLeft(), OBJECT_TYPE);
|
||||
generateInstanceOf(new Runnable() {
|
||||
@Override
|
||||
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));
|
||||
}
|
||||
|
||||
public void testAsInLoop() throws Exception {
|
||||
loadFile();
|
||||
generateFunction(); // assert no exception
|
||||
}
|
||||
|
||||
private Runnable newRunnable() {
|
||||
return new Runnable() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user