Skip to content

Commit c98038e

Browse files
committed
#1479 need to look at value, not key
1 parent c643bef commit c98038e

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.immutables.fixture.generics;
2+
3+
import com.google.common.collect.Multimap;
4+
import org.immutables.value.Value;
5+
6+
@Value.Enclosing
7+
public interface MultimapSafeVarargs {
8+
@Value.Immutable
9+
interface ParamKey {
10+
Multimap<Val<String>, String> vals();
11+
}
12+
@Value.Immutable
13+
interface ParamVal {
14+
Multimap<String, Val<String>> vals();
15+
}
16+
@Value.Immutable
17+
interface ParamBoth {
18+
Multimap<Val<String>, Val<String>> vals();
19+
}
20+
21+
interface Val<T> {}
22+
}

value-processor/src/org/immutables/value/processor/meta/ValueAttribute.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,8 @@ public boolean hasTypeAnnotations() {
993993
}
994994

995995
public boolean isNonRawElementType() {
996-
return getElementType().indexOf('<') > 0;
996+
List<String> args = typeParameters();
997+
return !args.isEmpty() && args.get(args.size() - 1).indexOf('<') > 0;
997998
}
998999

9991000
public boolean isNonRawSecondaryElementType() {

0 commit comments

Comments
 (0)