Browse Source

deal with uninferred argument monomorphs

Simon Krajewski 7 years ago
parent
commit
c4dd6dfd04
48 changed files with 78 additions and 78 deletions
  1. 3 3
      std/cpp/Lib.hx
  2. 3 3
      std/cpp/_std/sys/db/Mysql.hx
  3. 1 1
      std/cpp/_std/sys/db/Sqlite.hx
  4. 2 2
      std/cpp/_std/sys/io/Process.hx
  5. 2 2
      std/cpp/_std/sys/net/Socket.hx
  6. 4 4
      std/cpp/net/ThreadServer.hx
  7. 1 1
      std/cs/internal/FieldLookup.hx
  8. 1 1
      std/haxe/CallStack.hx
  9. 3 3
      std/haxe/Serializer.hx
  10. 3 3
      std/haxe/Unserializer.hx
  11. 2 2
      std/haxe/ds/ArraySort.hx
  12. 1 1
      std/haxe/io/BytesInput.hx
  13. 1 1
      std/haxe/macro/Context.hx
  14. 1 1
      std/haxe/macro/ExampleJSGenerator.hx
  15. 1 1
      std/haxe/remoting/ExternalConnection.hx
  16. 1 1
      std/haxe/remoting/SocketConnection.hx
  17. 3 3
      std/neko/Boot.hx
  18. 1 1
      std/neko/Web.hx
  19. 3 3
      std/neko/_std/sys/io/Process.hx
  20. 3 3
      std/neko/net/ThreadServer.hx
  21. 1 1
      std/neko/vm/Thread.hx
  22. 1 1
      std/python/Boot.hx
  23. 1 1
      std/python/internal/HxException.hx
  24. 2 2
      std/python/internal/HxOverrides.hx
  25. 2 2
      tests/misc/projects/Issue4720/Main.hx
  26. 1 1
      tests/misc/projects/Issue4742/Main.hx
  27. 1 1
      tests/misc/projects/Issue4766/Main1.hx
  28. 1 1
      tests/misc/projects/Issue4982/Main.hx
  29. 1 1
      tests/misc/src/Main.hx
  30. 5 5
      tests/unit/src/unit/MyClass.hx
  31. 3 3
      tests/unit/src/unit/Test.hx
  32. 1 1
      tests/unit/src/unit/TestIO.hx
  33. 1 1
      tests/unit/src/unit/TestMisc.hx
  34. 1 1
      tests/unit/src/unit/UnitBuilder.hx
  35. 1 1
      tests/unit/src/unit/issues/Issue1827.hx
  36. 1 1
      tests/unit/src/unit/issues/Issue2380.hx
  37. 1 1
      tests/unit/src/unit/issues/Issue2951.hx
  38. 1 1
      tests/unit/src/unit/issues/Issue3138.hx
  39. 1 1
      tests/unit/src/unit/issues/Issue3280.hx
  40. 1 1
      tests/unit/src/unit/issues/Issue3616.hx
  41. 1 1
      tests/unit/src/unit/issues/Issue4949.hx
  42. 1 1
      tests/unit/src/unit/issues/Issue4987.hx
  43. 1 1
      tests/unit/src/unit/issues/Issue5073.hx
  44. 1 1
      tests/unit/src/unit/issues/Issue5323.hx
  45. 1 1
      tests/unit/src/unit/issues/Issue5556.hx
  46. 1 1
      tests/unit/src/unit/issues/Issue5608.hx
  47. 2 2
      tests/unit/src/unitstd/Array.unit.hx
  48. 2 2
      tests/unit/src/unitstd/Lambda.unit.hx

+ 3 - 3
std/cpp/Lib.hx

@@ -22,8 +22,8 @@
 package cpp;
 
 /**
-	Platform-specific Cpp Library. Provides some platform-specific functions 
-	for the C++ target, such as conversion from Haxe types to native types 
+	Platform-specific Cpp Library. Provides some platform-specific functions
+	for the C++ target, such as conversion from Haxe types to native types
 	and vice-versa.
 **/
 class Lib {
@@ -65,7 +65,7 @@ class Lib {
 		Tries to load, and always returns a valid function, but the function may throw
 		if called.
 	**/
-	public static function loadLazy(lib,prim,nargs) : Dynamic {
+	public static function loadLazy(lib:String, prim:String, nargs:Int) : Dynamic {
 		try {
 			return untyped __global__.__loadprim(lib,prim,nargs);
 		} catch( e : Dynamic ) {

+ 3 - 3
std/cpp/_std/sys/db/Mysql.hx

@@ -69,7 +69,7 @@ private class MysqlResultSet implements sys.db.ResultSet {
 	private var __r : Dynamic;
 	private var cache : Dynamic;
 
-	public function new(r) {
+	public function new(r:Dynamic) {
 		__r = r;
 	}
 
@@ -127,11 +127,11 @@ private class MysqlConnection implements sys.db.Connection {
 
 	private var __c : Dynamic;
 
-	public function new(c) {
+	public function new(c:Dynamic) {
 		__c = c;
 	 D.set_conv_funs( cpp.Function.fromStaticFunction(D.charsToBytes),
                      cpp.Function.fromStaticFunction(D.secondsToDate) );
-    
+
 	}
 
 	public function request( s : String ) : sys.db.ResultSet {

+ 1 - 1
std/cpp/_std/sys/db/Sqlite.hx

@@ -115,7 +115,7 @@ private class SqliteResultSet implements ResultSet {
 	var r : Dynamic;
 	var cache : List<Dynamic>;
 
-	public function new( r ) {
+	public function new( r:Dynamic ) {
 		cache = new List();
 		this.r = r;
 		hasNext(); // execute the request

+ 2 - 2
std/cpp/_std/sys/io/Process.hx

@@ -28,7 +28,7 @@ private class Stdin extends haxe.io.Output {
 	var p : Dynamic;
 	var buf : haxe.io.Bytes;
 
-	public function new(p) {
+	public function new(p:Dynamic) {
 		this.p = p;
 		buf = haxe.io.Bytes.alloc(1);
 	}
@@ -60,7 +60,7 @@ private class Stdout extends haxe.io.Input {
 	var out : Bool;
 	var buf : haxe.io.Bytes;
 
-	public function new(p,out) {
+	public function new(p:Dynamic,out) {
 		this.p = p;
 		this.out = out;
 		buf = haxe.io.Bytes.alloc(1);

+ 2 - 2
std/cpp/_std/sys/net/Socket.hx

@@ -28,7 +28,7 @@ private class SocketInput extends haxe.io.Input {
 
    var __s : Dynamic;
 
-   public function new(s) {
+   public function new(s:Dynamic) {
       __s = s;
    }
 
@@ -73,7 +73,7 @@ private class SocketOutput extends haxe.io.Output {
 
    var __s : Dynamic;
 
-   public function new(s) {
+   public function new(s:Dynamic) {
       __s = s;
    }
 

+ 4 - 4
std/cpp/net/ThreadServer.hx

@@ -41,7 +41,7 @@ private typedef ClientInfos<Client> = {
 }
 
 /**
-    The ThreadServer can be used to easily create a multithreaded server where each thread polls multiple connections. 
+    The ThreadServer can be used to easily create a multithreaded server where each thread polls multiple connections.
     To use it, at a minimum you must override or rebind clientConnected, readClientMessage, and clientMessage and you must define your Client and Message.
 **/
 class ThreadServer<Client,Message> {
@@ -178,7 +178,7 @@ class ThreadServer<Client,Message> {
                 }
         }
 
-        function doClientDisconnected(s,c) {
+        function doClientDisconnected(s:sys.net.Socket,c) {
                 try s.close() catch( e : Dynamic ) {};
                 clientDisconnected(c);
         }
@@ -288,7 +288,7 @@ class ThreadServer<Client,Message> {
         }
 
         /**
-            Send data to a client. 
+            Send data to a client.
         **/
         public function sendData( s : sys.net.Socket, data : String ) {
                 try {
@@ -333,7 +333,7 @@ class ThreadServer<Client,Message> {
 
         /**
             Called when data has been read from a socket. This method should try to extract a message from the buffer.
-            The available data resides in buf, starts at pos, and is len bytes wide. Return the new message and the number of bytes read from the buffer. 
+            The available data resides in buf, starts at pos, and is len bytes wide. Return the new message and the number of bytes read from the buffer.
             If no message could be read, return null.
         **/
         public dynamic function readClientMessage( c : Client, buf : haxe.io.Bytes, pos : Int, len : Int ) : { msg : Message, bytes : Int } {

+ 1 - 1
std/cs/internal/FieldLookup.hx

@@ -28,7 +28,7 @@ package cs.internal;
 	@:readOnly public var name(default,never):String;
 	public var value:Dynamic;
 	public var next:FieldHashConflict;
-	public function new(hash, name, value, next) {
+	public function new(hash, name, value:Dynamic, next) {
 		untyped this.hash = hash;
 		untyped this.name = name;
 		this.value = value;

+ 1 - 1
std/haxe/CallStack.hx

@@ -266,7 +266,7 @@ class CallStack {
 	}
 
 	#if cpp @:noDebug #end /* Do not mess up the exception stack */
-	private static function makeStack(s #if cs : cs.system.diagnostics.StackTrace #elseif hl : hl.NativeArray<hl.Bytes> #end) {
+	private static function makeStack(s #if cs : cs.system.diagnostics.StackTrace #elseif hl : hl.NativeArray<hl.Bytes> #else : Dynamic #end) {
 		#if neko
 			var a = new Array();
 			var l = untyped __dollar__asize(s);

+ 3 - 3
std/haxe/Serializer.hx

@@ -170,7 +170,7 @@ class Serializer {
 		buf.add(s);
 	}
 
-	function serializeRef(v) {
+	function serializeRef(v:Dynamic) {
 		#if js
 		var vt = js.Lib.typeof(v);
 		#end
@@ -193,7 +193,7 @@ class Serializer {
 	#if flash
 	// only the instance variables
 
-	function serializeClassFields(v,c) {
+	function serializeClassFields(v:Dynamic, c:Dynamic) {
 		var xml : flash.xml.XML = untyped __global__["flash.utils.describeType"](c);
 		var vars = xml.factory[0].child("variable");
 		for( i in 0...vars.length() ) {
@@ -207,7 +207,7 @@ class Serializer {
 	}
 	#end
 
-	function serializeFields(v) {
+	function serializeFields(v:{}) {
 		for( f in Reflect.fields(v) ) {
 			serializeString(f);
 			serialize(Reflect.field(v,f));

+ 3 - 3
std/haxe/Unserializer.hx

@@ -49,7 +49,7 @@ class Unserializer {
 	/**
 		This value can be set to use custom type resolvers.
 
-		A type resolver finds a `Class` or `Enum` instance from a given `String`. 
+		A type resolver finds a `Class` or `Enum` instance from a given `String`.
 		By default, the Haxe `Type` Api is used.
 
 		A type resolver must provide two methods:
@@ -185,7 +185,7 @@ class Unserializer {
  		return Std.parseFloat(buf.substr(p1,pos-p1));
 	}
 
-	function unserializeObject(o) {
+	function unserializeObject(o:{}) {
  		while( true ) {
  			if( pos >= length )
  				throw "Invalid object";
@@ -200,7 +200,7 @@ class Unserializer {
  		pos++;
 	}
 
-	function unserializeEnum( edecl, tag ) {
+	function unserializeEnum<T>( edecl:Enum<T>, tag:String ) {
 		if( get(pos++) != ":".code )
 			throw "Invalid enum format";
 		var nargs = readDigits();

+ 2 - 2
std/haxe/ds/ArraySort.hx

@@ -91,7 +91,7 @@ class ArraySort {
 		doMerge(a, cmp, new_mid, second_cut, to, len1 - len11, len2 - len22);
 	}
 
-	static function rotate<T>(a:Array<T>, cmp, from, mid, to) {
+	static function rotate<T>(a:Array<T>, cmp:T -> T -> Int, from, mid, to) {
 		var n;
 		if (from == mid || mid == to) return;
 		n = gcd(to - from, mid - from);
@@ -153,7 +153,7 @@ class ArraySort {
 		a[j] = tmp;
 	}
 
-	static inline function compare<T>(a:Array<T>, cmp, i, j) {
+	static inline function compare<T>(a:Array<T>, cmp:T -> T -> Int, i, j) {
 		return cmp(a[i], a[j]);
 	}
 }

+ 1 - 1
std/haxe/io/BytesInput.hx

@@ -106,7 +106,7 @@ class BytesInput extends Input {
 		#end
 	}
 
-	public override function readBytes( buf : Bytes, pos, len ) : Int {
+	public override function readBytes( buf : Bytes, pos : Int, len : Int ) : Int {
 		#if !neko
 			if( pos < 0 || len < 0 || pos + len > buf.length )
 				throw Error.OutsideBounds;

+ 1 - 1
std/haxe/macro/Context.hx

@@ -606,7 +606,7 @@ class Context {
 	@:allow(haxe.macro.MacroStringTools)
 	@:allow(haxe.macro.TypedExprTools)
 	@:allow(haxe.macro.PositionTools)
-	static function load( f, nargs ) : Dynamic {
+	static function load(f:String, nargs:Int) : Dynamic {
 		#if neko
 		return neko.Lib.load("macro", f, nargs);
 		#elseif eval

+ 1 - 1
std/haxe/macro/ExampleJSGenerator.hx

@@ -54,7 +54,7 @@ class ExampleJSGenerator {
 		};
 	}
 
-	inline function print(str) {
+	inline function print(str:String) {
 		buf.add(str);
 	}
 

+ 1 - 1
std/haxe/remoting/ExternalConnection.hx

@@ -50,7 +50,7 @@ class ExternalConnection implements Connection implements Dynamic<Connection> {
 		return s.split("\\").join("\\\\");
 	}
 	#else
-	static inline function escapeString(s) {
+	static inline function escapeString(s:String) {
 		return s;
 	}
 	#end

+ 1 - 1
std/haxe/remoting/SocketConnection.hx

@@ -111,7 +111,7 @@ class SocketConnection implements AsyncConnection implements Dynamic<AsyncConnec
 		if( f.onResult != null ) f.onResult(ret);
 	}
 
-	function defaultLog(path,args,e) {
+	function defaultLog(path,args,e:Dynamic) {
 		// exception inside the called method
 		var astr, estr;
 		try astr = args.join(",") catch( e : Dynamic ) astr = "???";

+ 3 - 3
std/neko/Boot.hx

@@ -67,7 +67,7 @@ class Boot {
 	}
 
 	@:ifFeature("typed_catch")
-	private static function __instanceof(o,cl) {
+	private static function __instanceof(o:Dynamic, cl:Dynamic) {
 		untyped {
 			if( cl == Dynamic )
 				return true;
@@ -105,7 +105,7 @@ class Boot {
 		}
 	}
 
-	private static function __tagserialize(o) untyped {
+	private static function __tagserialize(o:Dynamic) untyped {
 		var n = o.__enum__.__ename__;
 		var x = __dollar__amake(n.length + 1);
 		for( i in 0...n.length )
@@ -114,7 +114,7 @@ class Boot {
 		return x;
 	}
 
-	private static function __unserialize(v) {
+	private static function __unserialize(v:Dynamic) {
 		untyped {
 			if( __dollar__typeof(v) != __dollar__tarray )
 				throw "Invalid serialized class data";

+ 1 - 1
std/neko/Web.hx

@@ -194,7 +194,7 @@ class Web {
 		_set_cookie(untyped key.__s, untyped v.__s);
 	}
 
-	static function addPair( buf : StringBuf, name, value ) {
+	static function addPair( buf : StringBuf, name:String, value:String ) {
 		if( value == null ) return;
 		buf.add("; ");
 		buf.add(name);

+ 3 - 3
std/neko/_std/sys/io/Process.hx

@@ -26,7 +26,7 @@ private class Stdin extends haxe.io.Output {
 	var p : Dynamic;
 	var buf : haxe.io.Bytes;
 
-	public function new(p) {
+	public function new(p:Dynamic) {
 		this.p = p;
 		buf = haxe.io.Bytes.alloc(1);
 	}
@@ -60,7 +60,7 @@ private class Stdout extends haxe.io.Input {
 	var out : Bool;
 	var buf : haxe.io.Bytes;
 
-	public function new(p,out) {
+	public function new(p:Dynamic,out) {
 		this.p = p;
 		this.out = out;
 		buf = haxe.io.Bytes.alloc(1);
@@ -94,7 +94,7 @@ private class Stdout extends haxe.io.Input {
 
 	public function new( cmd : String, ?args : Array<String>, ?detached : Bool ) : Void {
 		if( detached ) throw "Detached process is not supported on this platform";
-		p = try 
+		p = try
 			_run(untyped cmd.__s, neko.Lib.haxeToNeko(args))
 		catch( e : Dynamic )
 			throw "Process creation failure : "+cmd;

+ 3 - 3
std/neko/net/ThreadServer.hx

@@ -37,7 +37,7 @@ private typedef ClientInfos<Client> = {
 }
 
 /**
-	The ThreadServer can be used to easily create a multithreaded server where each thread polls multiple connections. 
+	The ThreadServer can be used to easily create a multithreaded server where each thread polls multiple connections.
 	To use it, at a minimum you must override or rebind clientConnected, readClientMessage, and clientMessage and you must define your Client and Message.
 **/
 class ThreadServer<Client,Message> {
@@ -174,7 +174,7 @@ class ThreadServer<Client,Message> {
 		}
 	}
 
-	function doClientDisconnected(s,c) {
+	function doClientDisconnected(s:sys.net.Socket,c) {
 		try s.close() catch( e : Dynamic ) {};
 		clientDisconnected(c);
 	}
@@ -329,7 +329,7 @@ class ThreadServer<Client,Message> {
 
 	/**
 		Called when data has been read from a socket. This method should try to extract a message from the buffer.
-		The available data resides in buf, starts at pos, and is len bytes wide. Return the new message and the number of bytes read from the buffer. 
+		The available data resides in buf, starts at pos, and is len bytes wide. Return the new message and the number of bytes read from the buffer.
 		If no message could be read, return null.
 	**/
 	public dynamic function readClientMessage( c : Client, buf : haxe.io.Bytes, pos : Int, len : Int ) : { msg : Message, bytes : Int } {

+ 1 - 1
std/neko/vm/Thread.hx

@@ -65,7 +65,7 @@ class Thread {
 		return thread_read_message(block);
 	}
 
-	@:keep function __compare(t) {
+	@:keep function __compare(t:Dynamic) {
 		return untyped __dollar__compare(handle,t.handle);
 	}
 

+ 1 - 1
std/python/Boot.hx

@@ -425,7 +425,7 @@ class Boot {
 
 
 
-	static inline function unsafeFastCodeAt (s, index) {
+	static inline function unsafeFastCodeAt (s:String, index:Int) {
 		return UBuiltins.ord(python.Syntax.arrayAccess(s, index));
 	}
 

+ 1 - 1
std/python/internal/HxException.hx

@@ -27,7 +27,7 @@ class HxException extends python.Exceptions.Exception {
 	@:ifFeature("has_throw")
 	public var val:Dynamic;
 	@:ifFeature("has_throw")
-	public function new(val) {
+	public function new(val:Dynamic) {
 		var message = UBuiltins.str(val);
 		super(message);
 		this.val = val;

+ 2 - 2
std/python/internal/HxOverrides.hx

@@ -70,7 +70,7 @@ class HxOverrides {
 	}
 
 	@:ifFeature("dynamic_read.push", "anon_optional_read.push", "anon_read.push")
-	static public function push(x, e) {
+	static public function push(x:Dynamic, e:Dynamic) {
 		if (Boot.isArray(x)) {
 			return (x:Array<Dynamic>).push(e);
 		}
@@ -94,7 +94,7 @@ class HxOverrides {
 	}
 
 	@:ifFeature("dynamic_read.map", "anon_optional_read.map", "anon_read.map")
-	static public function map(x, f) {
+	static public function map(x:Dynamic, f:Dynamic) {
 		if (Boot.isArray(x)) {
 			return (x:Array<Dynamic>).map(f);
 		}

+ 2 - 2
tests/misc/projects/Issue4720/Main.hx

@@ -44,11 +44,11 @@ class Main {
     // ... however deprecating getters and setters have some gotcha
     @:deprecated static var deprecatedProperty(get, set):String;
     static function get_deprecatedProperty():String return "0";
-    static function set_deprecatedProperty(value):String return "0";
+    static function set_deprecatedProperty(_):String return "0";
 
     static var deprecatedGetSet(get, set):String;
     @:deprecated static function get_deprecatedGetSet():String return "0";
-    @:deprecated static function set_deprecatedGetSet(value):String return "0";
+    @:deprecated static function set_deprecatedGetSet(_):String return "0";
 }
 
 @:deprecated

+ 1 - 1
tests/misc/projects/Issue4742/Main.hx

@@ -2,5 +2,5 @@ class Main {
     static function main() {
         f("Haxe is great!") + "abc"; // This must produce a error!
     }
-    static function f(s) : Void trace(s);
+    static function f(s:String) : Void trace(s);
 }

+ 1 - 1
tests/misc/projects/Issue4766/Main1.hx

@@ -1,5 +1,5 @@
 class C {
-    public function new(f) {}
+    public function new(_) {}
     public function f() {}
 }
 

+ 1 - 1
tests/misc/projects/Issue4982/Main.hx

@@ -3,7 +3,7 @@ class Main {
         throw invalidChar(65);
     }
 
-    static public function invalidChar(c) {
+    static public function invalidChar(_) {
         throw "error";
     }
 }

+ 1 - 1
tests/misc/src/Main.hx

@@ -63,7 +63,7 @@ class Main {
 		return new haxe.Template(s).execute(context, macros);
 	}
 
-	static function normPath(resolve, p:String, properCase = false):String {
+	static function normPath(_, p:String, properCase = false):String {
 		if (Sys.systemName() == "Windows")
 		{
 			// on windows, haxe returns lowercase paths with backslashes, drive letter uppercased

+ 5 - 5
tests/unit/src/unit/MyClass.hx

@@ -147,8 +147,8 @@ class InitProperties {
 	public var accNever(default, never):Int = 3;
 	public var accDynamic(default, dynamic):Int = 3;
 
-	function set_accFunc(v) return throw "setter was called";
-	function set_accDynamic(v) return throw "setter was called";
+	function set_accFunc(_) return throw "setter was called";
+	function set_accDynamic(_) return throw "setter was called";
 	public function new() { }
 }
 
@@ -212,7 +212,7 @@ class UsingUnrelated {
 		return 1;
 	}
 
-	static function set_SX(v) {
+	static function set_SX(v:Int) {
 		return v;
 	}
 
@@ -240,7 +240,7 @@ class UsingUnrelated {
 		return 1;
 	}
 
-	function set_x(v) {
+	function set_x(v:Int) {
 		return v;
 	}
 
@@ -269,7 +269,7 @@ class BaseSuperProp {
 	}
 
 	function get_prop() return 1;
-	function set_prop(v) return v;
+	function set_prop(v:Int) return v;
 
 	function get_fProp() return function(i:Int) return "test" +i;
 }

+ 3 - 3
tests/unit/src/unit/Test.hx

@@ -158,7 +158,7 @@ class Test {
 			return;
 		}
 		asyncWaits.push(pos);
-		seterror(function(e) {
+		seterror(function(_) {
 			incrCount(pos);
 			if( asyncWaits.remove(pos) )
 				checkDone();
@@ -167,7 +167,7 @@ class Test {
 				success = false;
 			}
 		});
-		f(args,function(v) {
+		f(args,function(_) {
 			incrCount(pos);
 			if( asyncWaits.remove(pos) ) {
 				report("No exception occurred",pos);
@@ -180,7 +180,7 @@ class Test {
 		});
 	}
 
-	function log( msg, ?pos : haxe.PosInfos ) {
+	function log( msg : String, ?pos : haxe.PosInfos ) {
 		haxe.Log.trace(msg,pos);
 	}
 

+ 1 - 1
tests/unit/src/unit/TestIO.hx

@@ -8,7 +8,7 @@ class TestIO extends Test {
 		check(true);
 	}
 
-	function excv<T>( f, e : T, ?pos ) {
+	function excv<T>( f:Void -> Void, e : T, ?pos ) {
 		try {
 			f();
 			eq(null,e,pos);

+ 1 - 1
tests/unit/src/unit/TestMisc.hx

@@ -227,7 +227,7 @@ class TestMisc extends Test {
 		eq( bar(), 50);
 	}
 
-	function id(x) {
+	function id<T>(x:T) {
 		return x;
 	}
 

+ 1 - 1
tests/unit/src/unit/UnitBuilder.hx

@@ -75,7 +75,7 @@ class UnitBuilder {
 		}
 	}
 
-	static function mkEq(e1, e2, p) {
+	static function mkEq(e1, e2, p:Position) {
 		function isFloat(e) {
 			try return switch(Context.follow(Context.typeof(e))) {
 				case TAbstract(tr, _):

+ 1 - 1
tests/unit/src/unit/issues/Issue1827.hx

@@ -109,7 +109,7 @@ class Issue1827 extends Test {
 		return 0;
 	}
 
-	@:extern static inline function callInline(i1, i2) {
+	@:extern static inline function callInline(i1:Int, _) {
 		return i1;
 	}
 }

+ 1 - 1
tests/unit/src/unit/issues/Issue2380.hx

@@ -12,5 +12,5 @@ class Issue2380 extends unit.Test
 #if !cpp @:nativeGen #end private class SomeCls
 {
 	public function new():Void {}
-	@:keep public function test(v) return v == null;
+	@:keep public function test(v:Dynamic) return v == null;
 }

+ 1 - 1
tests/unit/src/unit/issues/Issue2951.hx

@@ -5,7 +5,7 @@ import unit.Test;
 
 class Issue2951 extends Test{
 
-  public static inline function foo (x) {
+  public static inline function foo (_) {
 
   }
 

+ 1 - 1
tests/unit/src/unit/issues/Issue3138.hx

@@ -12,7 +12,7 @@ class Issue3138 extends Test
 }
 
 private class A {
-	public function new(a) {}
+	public function new(_) {}
 }
 
 private class B extends A {

+ 1 - 1
tests/unit/src/unit/issues/Issue3280.hx

@@ -9,7 +9,7 @@ class Issue3280 extends Test {
 		return param;
 	}
 
-	static function iter( v : Int, f) {
+	static function iter( v : Int, f : Int -> String) {
 		return f(v-1);
 	}
 

+ 1 - 1
tests/unit/src/unit/issues/Issue3616.hx

@@ -12,7 +12,7 @@ private abstract B<T>(T) {
 private abstract C(Null<Int>) {
 	public static var f(get,set):Int;
 	static function get_f() return 1;
-	static function set_f(value) return 1;
+	static function set_f(_) return 1;
 }
 
 class Issue3616 extends Test {

+ 1 - 1
tests/unit/src/unit/issues/Issue4949.hx

@@ -12,7 +12,7 @@ class Issue4949 extends Test {
 		}
 	}
 
-	function next(d) { }
+	function next(_) { }
 
 	function test() {
 		foo();

+ 1 - 1
tests/unit/src/unit/issues/Issue4987.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue4987 extends Test implements ISetter implements ISetter2 {
 	public var property(default, set):Int;
-	function set_property(i) return 0;
+	function set_property(_) return 0;
 
 	function test() {
 		property = 0;

+ 1 - 1
tests/unit/src/unit/issues/Issue5073.hx

@@ -11,5 +11,5 @@ class Issue5073 extends Test {
 		pretendToRun(dontRunMe);
 	}
 
-	static function pretendToRun(f) { }
+	static function pretendToRun(_) { }
 }

+ 1 - 1
tests/unit/src/unit/issues/Issue5323.hx

@@ -7,7 +7,7 @@ class Issue5323 extends Test{
         eq(actual, expected);
     }
 
-    function doStuff(self) {
+    function doStuff(_) {
         return doOtherStuff();
     }
 

+ 1 - 1
tests/unit/src/unit/issues/Issue5556.hx

@@ -13,5 +13,5 @@ class Issue5556 extends unit.Test {
 		return 1;
 	}
 
-	static dynamic function dynamicFunc(x) return x;
+	static dynamic function dynamicFunc(x:Dynamic) return x;
 }

+ 1 - 1
tests/unit/src/unit/issues/Issue5608.hx

@@ -9,5 +9,5 @@ class Issue5608 extends unit.Test implements Dynamic<Bool> {
 		t(true);
 	}
 
-	public function resolve( name ) return true;
+	public function resolve(_) return true;
 }

+ 2 - 2
tests/unit/src/unitstd/Array.unit.hx

@@ -263,8 +263,8 @@ var func = function(s) return s.toUpperCase();
 [1, 2, 3, 4].filter(function(i) return i < 3) == [1, 2];
 [1, 2, 3, 4].filter(function(i) return true) == [1, 2, 3, 4];
 [1, 2, 3, 4].filter(function(i) return false) == [];
-[].filter(function(i) return true) == [];
-[].filter(function(i) return false) == [];
+[].filter(function(_) return true) == [];
+[].filter(function(_) return false) == [];
 var arr = [{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}];
 arr = arr.filter(function(i) return i.id % 2 != 0);
 var values = [];

+ 2 - 2
tests/unit/src/unitstd/Lambda.unit.hx

@@ -81,8 +81,8 @@ Lambda.iter([],function(i) return throw "no call");
 Lambda.array(Lambda.filter([1,2,3,4],function(i) return i < 3)) == [1,2];
 Lambda.array(Lambda.filter([1,2,3,4],function(i) return true)) == [1,2,3,4];
 Lambda.array(Lambda.filter([1,2,3,4],function(i) return false)) == [];
-Lambda.array(Lambda.filter([],function(i) return false)) == [];
-Lambda.array(Lambda.filter([],function(i) return true)) == [];
+Lambda.array(Lambda.filter([],function(_) return false)) == [];
+Lambda.array(Lambda.filter([],function(_) return true)) == [];
 Lambda.array(Lambda.filter([],null)) == [];