-
Notifications
You must be signed in to change notification settings - Fork 16
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
Set var arg type before calling viewpointAdaptConstructor
#783
Changes from 4 commits
0aad74a
c5f3f3c
816b787
3ab44c8
14f4c61
b76f6b5
70869f6
884a1ec
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import viewpointtest.quals.*; | ||
|
||
public class VarargType { | ||
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. What is the 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. changed it to VarargsConstructor. |
||
|
||
VarargType(String str, Object... args) {} | ||
|
||
void foo() { | ||
VarargType a = new VarargType("testStr", new Object()); | ||
} | ||
|
||
// inner class | ||
class Inner { | ||
Inner(String str, Object... args) {} | ||
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. How about only the varargs parameter and then test with:
To test more of the tricky combinations with inner classes. 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. Added. |
||
|
||
void foo() { | ||
Inner a = new Inner("testStr", new Object()); | ||
} | ||
} | ||
|
||
// anonymous class | ||
Object o = | ||
new Object() { | ||
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. This doesn't test that the varargs constructor can be used to create an anonymous class. It should be something like 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. Okay, thanks! |
||
void foo() { | ||
VarargType a = new VarargType("testStr", new Object()); | ||
} | ||
}; | ||
} |
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.
Can you add the usual starter text with a link to the issue that this test is for?
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.
Tests that actually use some annotations would be nice.
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.
Done
Done