summaryrefslogtreecommitdiffstats
path: root/tests/bugs190/520135/FailsApectJ.java
blob: b7d67af4d298c520cbff5d4fa03f1bca4f37e914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.afrozaar.aspectj.test;

import java.util.function.Function;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class FailsApectJ {
	static aspect X {
		before(): within(FailsApectJ) && call(* *(..)) {}
	}

    private <T> Function<String, Collection<String>> ASpectJFailWithWildCardAndVarArgeMethodReference() {
        Function<T, ? extends Object> x = a -> a; // the wild card fails the compile
        x.andThen(this::get);
        return null;
    }

    private <T> List<T> get(T... args) {
        return Arrays.asList(args);
    }

}