浏览代码

[tests] Add test for #9069 (#11955)

Rudy Ges 7 月之前
父节点
当前提交
559ad19000

+ 15 - 0
tests/misc/projects/Issue9069/Main.hx

@@ -0,0 +1,15 @@
+class Main {
+  static function main() {
+    foo();
+    foo(42);
+    foo("");
+  }
+
+  @:deprecated
+  static extern inline overload function foo():Void {}
+
+  static extern inline overload function foo(i:Int):Void {}
+
+  @:deprecated
+  static extern inline overload function foo(s:String):Void {}
+}

+ 3 - 0
tests/misc/projects/Issue9069/compile.hxml

@@ -0,0 +1,3 @@
+-main Main
+-D message.reporting=pretty
+-D message.no-color

+ 12 - 0
tests/misc/projects/Issue9069/compile.hxml.stderr

@@ -0,0 +1,12 @@
+[WARNING] Main.hx:3: characters 5-10
+
+ 3 |     foo();
+   |     ^^^^^
+   | (WDeprecated) Usage of this field is deprecated
+
+[WARNING] Main.hx:5: characters 5-12
+
+ 5 |     foo("");
+   |     ^^^^^^^
+   | (WDeprecated) Usage of this field is deprecated
+