Old style retagging should emit a compiler warning when newdecls are required.

This commit is contained in:
Ryan Stecker
2014-12-17 16:37:39 -06:00
parent 58194c5d99
commit 154d84668b
4 changed files with 26 additions and 1 deletions
@@ -0,0 +1,18 @@
#pragma newdecls required
enum MyType:{};
native void Print(MyType value);
native void PrintF(float value);
public void main()
{
int val = 2;
MyType otherVal = MyType:val;
float value2 = Float:val;
Print(otherVal);
PrintF(value2);
}
@@ -0,0 +1,2 @@
(12) : warning 240: 'MyType:' is an old-style tag operation; use view_as<MyType>(expression) instead
(14) : warning 240: 'Float:' is an old-style tag operation; use view_as<float>(expression) instead