Old style retagging should emit a compiler warning when newdecls are required.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user