diff --git a/source/herd/depin/api/Target.ceylon b/source/herd/depin/api/Target.ceylon index 60ecc05..fb1774e 100644 --- a/source/herd/depin/api/Target.ceylon +++ b/source/herd/depin/api/Target.ceylon @@ -25,7 +25,7 @@ shared abstract class Target extends Injection { shared FunctionModel|ValueModel targetConstructor { - value chain = model.getCallableConstructors(`TargetAnnotation`) + value chain = model.getCallableConstructors<>(`TargetAnnotation`) .chain(model.getValueConstructors(`TargetAnnotation`)); if (!model.defaultConstructor exists) { if (chain.empty) { diff --git a/source/herd/depin/engine/DefinitionFactory.ceylon b/source/herd/depin/engine/DefinitionFactory.ceylon index 2460323..15ae5d3 100644 --- a/source/herd/depin/engine/DefinitionFactory.ceylon +++ b/source/herd/depin/engine/DefinitionFactory.ceylon @@ -1,3 +1,4 @@ + import ceylon.language.meta { type } @@ -19,8 +20,8 @@ shared class DefinitionFactory(Identification.Holder holder) satisfies Definitio try{ annotations = declaration.annotations() .select((Annotation element) => holder.types.contains(type(element))); - }catch(Exception x){ - //Ceylon BUG!!! We can't identifiy parameter by annotations but for now we can use name of the parameter. + }catch(Throwable x){ + //Ceylon BUG (https://github.com/eclipse/ceylon/issues/7448)!!! We can't identifiy parameter by annotations but for now we can use name of the parameter. //This will be enough for most of cases. annotations={NamedAnnotation(declaration.name)}; } diff --git a/test/test/herd/depin/engine/integration/ClassInjectionTest.ceylon b/test/test/herd/depin/engine/integration/ClassInjectionTest.ceylon index 6648cb6..257fd33 100644 --- a/test/test/herd/depin/engine/integration/ClassInjectionTest.ceylon +++ b/test/test/herd/depin/engine/integration/ClassInjectionTest.ceylon @@ -1,6 +1,5 @@ import ceylon.test { - test, - ignore + test } import herd.depin.engine { @@ -41,7 +40,6 @@ shared class ClassInjectionTest() { shared test void shouldInjectDefaultedParameterClassFunction(){ assert(depin.inject(`DefaultedParameterFunction`).defaultedFunction()==fixture.defaultedParameterFunction.param); } - ignore("until https://github.com/eclipse/ceylon/issues/7448 fixed") shared test void shouldInjectTargetedConstructor(){ assert(depin.inject(`TargetWithTwoCallableConstructors`).something==fixture.targetWithTwoCallableConstructors.param.reversed); } diff --git a/test/test/herd/depin/engine/integration/model/TargetWithTwoCallableConstructors.ceylon b/test/test/herd/depin/engine/integration/model/TargetWithTwoCallableConstructors.ceylon index 3ee7b84..28f2ed8 100644 --- a/test/test/herd/depin/engine/integration/model/TargetWithTwoCallableConstructors.ceylon +++ b/test/test/herd/depin/engine/integration/model/TargetWithTwoCallableConstructors.ceylon @@ -11,7 +11,7 @@ shared class TargetWithTwoCallableConstructors { } - shared target new targetedConstructor(named("Abc") String something){ + shared target new targetedConstructor(named("I will be ignored any way! Bug, bug, bug") String something){ this.something=something.reversed; }