Skip to content

Commit 6e373f4

Browse files
EotT123EotT123
EotT123
authored and
EotT123
committed
1 parent dfd4a3a commit 6e373f4

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
<artifactId>manifold-props</artifactId>
4545
<version>${manifold.version}</version>
4646
</path>
47+
<path>
48+
<groupId>systems.manifold</groupId>
49+
<artifactId>manifold-params</artifactId>
50+
<version>${manifold.version}</version>
51+
</path>
4752
<path>
4853
<groupId>com.h2database</groupId>
4954
<artifactId>h2</artifactId>
@@ -76,6 +81,11 @@
7681
<artifactId>manifold-props-rt</artifactId>
7782
<version>${manifold.version}</version>
7883
</dependency>
84+
<dependency>
85+
<groupId>systems.manifold</groupId>
86+
<artifactId>manifold-params-rt</artifactId>
87+
<version>${manifold.version}</version>
88+
</dependency>
7989
<dependency>
8090
<groupId>com.h2database</groupId>
8191
<artifactId>h2</artifactId>

src/main/java/t689/Test.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package t689;
2+
3+
import java.util.function.Function;
4+
5+
public class Test {
6+
7+
public static void main(String[] args) {
8+
// works
9+
new Foo(s -> s.length());
10+
new Foo(String::length);
11+
12+
Function<String, Integer> fooFunction = String::length;
13+
new Foo(fooFunction:fooFunction);
14+
15+
// error
16+
17+
new Foo(fooFunction:s -> s.length());
18+
new Foo(fooFunction:String::length);
19+
}
20+
21+
22+
public static class Foo {
23+
private final Function<String, Integer> fooFunction;
24+
private final boolean bar;
25+
26+
Foo(Function<String, Integer> fooFunction, boolean bar = false){
27+
this.fooFunction =fooFunction;
28+
this.bar = bar;
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)