-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan through members in InitializationFieldAccessVisitor
#619
Changes from all commits
9f489a1
9ab632b
77a5db2
471764d
691797d
d68c91f
0c58b01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,15 +116,15 @@ Before: InitializationStore#19( | |
3 -> 0 | ||
|
||
2: | ||
Before: NullnessNoInitStore#26( | ||
Before: NullnessNoInitStore#27( | ||
|
||
isPolyNullNonNull = false | ||
isPolyNullNull = false) | ||
~~~~~~~~~ | ||
<entry> | ||
|
||
3: | ||
Before: NullnessNoInitStore#26( | ||
Before: NullnessNoInitStore#27( | ||
|
||
isPolyNullNonNull = false | ||
isPolyNullNull = false) | ||
|
@@ -133,7 +133,7 @@ Before: NullnessNoInitStore#26( | |
(this).sf = "" [ Assignment ] > NV{@NonNull, String, poly nn/n=f/f} | ||
|
||
0: | ||
Before: NullnessNoInitStore#27( | ||
Before: NullnessNoInitStore#28( | ||
Issue5174Super<S>.sf > NV{@NonNull, String, poly nn/n=f/f} | ||
isPolyNullNonNull = false | ||
isPolyNullNull = false) | ||
|
@@ -143,7 +143,7 @@ Before: NullnessNoInitStore#27( | |
8 -> 5 | ||
|
||
7: | ||
Before: NullnessNoInitStore#31( | ||
Before: NullnessNoInitStore#32( | ||
in > NV{, S, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
this.f > NV{, S, poly nn/n=f/f} | ||
|
@@ -153,7 +153,7 @@ Before: NullnessNoInitStore#31( | |
<entry> | ||
|
||
8: | ||
Before: NullnessNoInitStore#31( | ||
Before: NullnessNoInitStore#32( | ||
in > NV{, S, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
this.f > NV{, S, poly nn/n=f/f} | ||
|
@@ -164,7 +164,7 @@ in [ LocalVariable ] > NV{, S, poly nn/n=f/f} | |
return in [ Return ] > NV{@NonNull, boolean, poly nn/n=f/f} | ||
|
||
5: | ||
Before: NullnessNoInitStore#32( | ||
Before: NullnessNoInitStore#33( | ||
in > NV{, S, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
this.f > NV{, S, poly nn/n=f/f} | ||
|
@@ -180,7 +180,7 @@ Before: NullnessNoInitStore#32( | |
16 -> 11 | ||
|
||
13: | ||
Before: NullnessNoInitStore#36( | ||
Before: NullnessNoInitStore#37( | ||
f > NV{, S, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
isPolyNullNonNull = false | ||
|
@@ -189,7 +189,7 @@ Before: NullnessNoInitStore#36( | |
<entry> | ||
|
||
14: | ||
Before: NullnessNoInitStore#36( | ||
Before: NullnessNoInitStore#37( | ||
f > NV{, S, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
isPolyNullNonNull = false | ||
|
@@ -199,7 +199,7 @@ Before: NullnessNoInitStore#36( | |
(this).<init> [ MethodAccess ] > NV{@NonNull, Issue5174Super, poly nn/n=f/f} | ||
|
||
15: | ||
Before: NullnessNoInitStore#37( | ||
Before: NullnessNoInitStore#38( | ||
f > NV{, S, poly nn/n=f/f} | ||
this > NV{@NonNull, Issue5174Super, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
|
@@ -209,7 +209,7 @@ Before: NullnessNoInitStore#37( | |
(this).<init>() [ MethodInvocation ] > NV{@NonNull, Object, poly nn/n=f/f} | ||
|
||
16: | ||
Before: NullnessNoInitStore#38( | ||
Before: NullnessNoInitStore#39( | ||
f > NV{, S, poly nn/n=f/f} | ||
this > NV{@NonNull, Issue5174Super, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
|
@@ -225,7 +225,7 @@ this.f = f [ Assignment ] > NV{, S, poly nn/n=f/f} | |
expression statement this.f = f [ ExpressionStatement ] | ||
|
||
12: | ||
Before: NullnessNoInitStore#39( | ||
Before: NullnessNoInitStore#40( | ||
f > NV{, S, poly nn/n=f/f} | ||
this > NV{@NonNull, Issue5174Super, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
|
@@ -235,7 +235,7 @@ Before: NullnessNoInitStore#39( | |
<exceptional-exit> | ||
|
||
11: | ||
Before: NullnessNoInitStore#42( | ||
Before: NullnessNoInitStore#43( | ||
f > NV{, S, poly nn/n=f/f} | ||
this > NV{@NonNull, Issue5174Super, poly nn/n=f/f} | ||
Issue5174Super<S>.sf > NV{@NonNull, Object, poly nn/n=f/f} | ||
|
@@ -413,12 +413,12 @@ Before: InitializationStore#93( | |
~~~~~~~~~ | ||
o [ VariableDeclaration ] | ||
(this) [ ImplicitThis ] | ||
(this).f [ FieldAccess ] > CFAV{@Initialized, Object} | ||
o = (this).f [ Assignment ] > CFAV{@Initialized, Object} | ||
(this).f [ FieldAccess ] > CFAV{, T} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @flo2702 These changes come a bit as a surprise, but look good to me - field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like scanning through all members once in the visitor somehow allows more precise types to be used during the dataflow refinement. Probably something to consider while I look for a better fix, but I admit that I don't really understand how the visitor affects the refinement in this way. |
||
o = (this).f [ Assignment ] > CFAV{, T} | ||
|
||
39: | ||
Before: InitializationStore#94( | ||
o > CFAV{@Initialized, Object} | ||
o > CFAV{, T} | ||
initialized fields = []) | ||
~~~~~~~~~ | ||
<exit> | ||
|
@@ -437,12 +437,12 @@ Before: InitializationStore#98( | |
~~~~~~~~~ | ||
o [ VariableDeclaration ] | ||
this [ ExplicitThis ] > CFAV{@Initialized, Issue5174Sub} | ||
this.f [ FieldAccess ] > CFAV{@Initialized, Object} | ||
o = this.f [ Assignment ] > CFAV{@Initialized, Object} | ||
this.f [ FieldAccess ] > CFAV{, T} | ||
o = this.f [ Assignment ] > CFAV{, T} | ||
|
||
44: | ||
Before: InitializationStore#99( | ||
o > CFAV{@Initialized, Object} | ||
o > CFAV{, T} | ||
initialized fields = []) | ||
~~~~~~~~~ | ||
<exit> | ||
|
@@ -739,12 +739,12 @@ Before: InitializationStore#203( | |
~~~~~~~~~ | ||
o [ VariableDeclaration ] | ||
(this) [ ImplicitThis ] | ||
(this).f [ FieldAccess ] > CFAV{@Initialized, Object} | ||
o = (this).f [ Assignment ] > CFAV{@Initialized, Object} | ||
(this).f [ FieldAccess ] > CFAV{, T} | ||
o = (this).f [ Assignment ] > CFAV{, T} | ||
|
||
87: | ||
Before: InitializationStore#204( | ||
o > CFAV{@Initialized, Object} | ||
o > CFAV{, T} | ||
initialized fields = []) | ||
~~~~~~~~~ | ||
<exit> | ||
|
@@ -795,17 +795,17 @@ Before: InitializationStore#211( | |
Before: InitializationStore#218( | ||
initialized fields = []) | ||
~~~~~~~~~ | ||
Issue5174Sub.this.f [ FieldAccess ] > CFAV{@Initialized, Object} | ||
Issue5174Sub.this.f [ FieldAccess ] > CFAV{, T} | ||
|
||
101: | ||
Before: InitializationStore#221( | ||
initialized fields = []) | ||
~~~~~~~~~ | ||
o = Issue5174Sub.this.f [ Assignment ] > CFAV{@Initialized, Object} | ||
o = Issue5174Sub.this.f [ Assignment ] > CFAV{, T} | ||
|
||
92: | ||
Before: InitializationStore#224( | ||
o > CFAV{@Initialized, Object} | ||
o > CFAV{, T} | ||
initialized fields = []) | ||
~~~~~~~~~ | ||
<exit> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
interface Issue612A {} | ||
|
||
@interface Issue612B { | ||
Class<? extends Issue612A> value(); | ||
} | ||
|
||
class Issue612C implements Issue612A {} | ||
|
||
class Issue612E {} | ||
|
||
@interface Issue612Z { | ||
abstract class Issue612D implements Issue612A { | ||
|
||
public Issue612D() { | ||
g(new Issue612E()); | ||
} | ||
|
||
static void g(Object... xs) {} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@interface Issue612Min { | ||
class D { | ||
D() { | ||
g(new Object()); | ||
} | ||
|
||
static void g(Object... xs) {} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flo2702 This is the key change in this PR. Sorry for adding so many other changes while tracking this down.
I think I'll merge this PR now, to fix the exception. Can you open a new PR if you find a better fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I'll keep looking, but haven't found anything better.