mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6919944: incorrect position given for duplicate annotation value error
Reviewed-by: darcy
This commit is contained in:
parent
187a9d305c
commit
1433e8c817
19 changed files with 19 additions and 19 deletions
|
@ -2047,7 +2047,7 @@ public class Check {
|
||||||
Symbol m = TreeInfo.symbol(assign.lhs);
|
Symbol m = TreeInfo.symbol(assign.lhs);
|
||||||
if (m == null || m.type.isErroneous()) continue;
|
if (m == null || m.type.isErroneous()) continue;
|
||||||
if (!members.remove(m))
|
if (!members.remove(m))
|
||||||
log.error(arg.pos(), "duplicate.annotation.member.value",
|
log.error(assign.lhs.pos(), "duplicate.annotation.member.value",
|
||||||
m.name, a.type);
|
m.name, a.type);
|
||||||
if (assign.rhs.getTag() == ANNOTATION)
|
if (assign.rhs.getTag() == ANNOTATION)
|
||||||
validateAnnotation((JCAnnotation)assign.rhs);
|
validateAnnotation((JCAnnotation)assign.rhs);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values
|
* @summary check for duplicate annotation values
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:10:45: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:10:37: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values
|
* @summary check for duplicate annotation values
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:10:34: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:10:26: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values for type parameter
|
* @summary check for duplicate annotation values for type parameter
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:10:39: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:10:31: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values
|
* @summary check for duplicate annotation values
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:10:51: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:10:43: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values for type parameter
|
* @summary check for duplicate annotation values for type parameter
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:8:64: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:8:56: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values in receiver
|
* @summary check for duplicate annotation values in receiver
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:9:37: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:9:29: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values for type parameter
|
* @summary check for duplicate annotation values for type parameter
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:9:50: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:9:42: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values for type parameter
|
* @summary check for duplicate annotation values for type parameter
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:8:54: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:8:46: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 6843077
|
* @bug 6843077 6919944
|
||||||
* @summary check for duplicate annotation values for type parameter
|
* @summary check for duplicate annotation values for type parameter
|
||||||
* @author Mahmood Ali
|
* @author Mahmood Ali
|
||||||
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
DuplicateAnnotationValue.java:9:50: compiler.err.duplicate.annotation.member.value: value, A
|
DuplicateAnnotationValue.java:9:42: compiler.err.duplicate.annotation.member.value: value, A
|
||||||
1 error
|
1 error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue