<div class="chatlog__message-group"> <div id="chatlog__message-container-700187076242571315" class="chatlog__message-container" data-message-id="700187076242571315"> <div class="chatlog__message"> <div class="chatlog__message-aside"><img class="chatlog__avatar" src="https://cdn.discordapp.com/avatars/293624673265123328/accd07acc220a18568ba46a6e9ede18a.png?size=512" alt="Avatar" loading="lazy"></div> <div class="chatlog__message-primary"> <div class="chatlog__header"><span class="chatlog__author" style="color:rgb(17,128,106)" title="koher" data-user-id="293624673265123328">koher</span> <a href="/channels/375206337937801216?category=main&channel=swift-zatsu&message_id=700187849651257344"><span class="chatlog__timestamp" title="Thursday, April 16, 2020 3:33 AM"></span></a><a href="#chatlog__message-container-700187076242571315">4/16/2020 3:33 AM</a></div> <div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">なんか型パラと配列問題ってあった気が。</span></div> </div> </div> </div> <div id="chatlog__message-container-700187849651257344" class="chatlog__message-container" data-message-id="700187849651257344"> <div class="chatlog__message"> <div class="chatlog__message-aside"> <div class="chatlog__short-timestamp" title="Thursday, April 16, 2020 3:36 AM">3:36 AM</div> </div> <div class="chatlog__message-primary"> <div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">$ cat AmbiguousVarArgs.java public class AmbiguousVarArgs { public static void main(String[] args) { String[] ss = { "XYZ" }; foo(ss); } static <T> void foo(T... xs) { System.out.println(xs); } } $ javac AmbiguousVarArgs.java Note: AmbiguousVarArgs.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. $ javac -Xlint:unchecked AmbiguousVarArgs.java AmbiguousVarArgs.java:7: warning: [unchecked] Possible heap pollution from parameterized vararg type T static <T> void foo(T... xs) { ^ where T is a type-variable: T extends Object declared in method <T>foo(T...) 1 warning $ java AmbiguousVarArgs [Ljava.lang.String;@7852e922</code></span></div> </div> </div> </div> </div>