def args in constructors
This commit is contained in:
@@ -486,6 +486,8 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
AnnotationVisitor jetValueParameterAnnotation =
|
||||
mv.visitParameterAnnotation(i++, JvmStdlibNames.JET_VALUE_PARAMETER.getDescriptor(), true);
|
||||
jetValueParameterAnnotation.visit(JvmStdlibNames.JET_VALUE_PARAMETER_NAME_FIELD, valueParameter.getName());
|
||||
if(valueParameter.hasDefaultValue())
|
||||
jetValueParameterAnnotation.visit(JvmStdlibNames.JET_VALUE_PARAMETER_HAS_DEFAULT_VALUE_FIELD, Boolean.TRUE);
|
||||
jetValueParameterAnnotation.visitEnd();
|
||||
}
|
||||
}
|
||||
@@ -574,7 +576,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
}
|
||||
|
||||
final ClassDescriptor outerDescriptor = getOuterClassDescriptor();
|
||||
if (outerDescriptor != null && outerDescriptor.getKind() != ClassKind.OBJECT) {
|
||||
if (outerDescriptor != null && !CodegenUtil.isClassObject(outerDescriptor)) {
|
||||
final Type type = typeMapper.mapType(outerDescriptor.getDefaultType(), OwnerKind.IMPLEMENTATION);
|
||||
String interfaceDesc = type.getDescriptor();
|
||||
final String fieldName = "this$0";
|
||||
|
||||
@@ -3,7 +3,7 @@ package std.concurrent
|
||||
import java.util.concurrent.Executor
|
||||
import jet.Iterator
|
||||
|
||||
class FunctionalQueue<T>(
|
||||
class FunctionalQueue<T> (
|
||||
val input: FunctionalList<T> = FunctionalList.emptyList<T>(),
|
||||
val output: FunctionalList<T> = FunctionalList.emptyList<T>()) {
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package test.concurrent
|
||||
|
||||
import std.concurrent.*
|
||||
import junit.framework.*
|
||||
|
||||
class FListTest() : TestCase() {
|
||||
fun testEmpty() {
|
||||
val empty = FunctionalQueue<Int> ()
|
||||
Assert.assertTrue(empty.empty)
|
||||
}
|
||||
|
||||
fun testNonEmpty() {
|
||||
// val empty = FunctionalList.emptyList<Int> ()
|
||||
// assertTrue(!(empty + 10).empty)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user