Skip to content

Commit 0a0b1c8

Browse files
committed
Add warning test script.
1 parent 9e63058 commit 0a0b1c8

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

samples/Basic/Assets/Scripts/Test02.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ string Test(int param_a, float param_b)
1414
int local_c = (int)(param_a + param_b);
1515
if (param_a > 0)
1616
{
17-
string local_d = "A+" + param_b;
17+
string local_d = "A+" + local_c + "/" + param_b;
1818
return local_d;
1919
}
2020
else
2121
{
22-
string local_e = "A-" + param_b;
22+
string local_e = "A-" + local_c + "/" + param_b;
2323
return local_e;
2424
}
2525
}

samples/Basic/Assets/Scripts/Test03.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using UnityEngine;
1+
using System.Collections;
2+
using UnityEngine;
23
using UnityEngine.UI;
34

45
public class Test03 : MonoBehaviour
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System.Collections;
2+
using UnityEngine;
3+
4+
public class Test04 : MonoBehaviour
5+
{
6+
// warning test
7+
8+
private Hashtable table; // CS0649
9+
10+
private int x = 1; // CS0414
11+
12+
public void Func(object o, string p)
13+
{
14+
int j; // CS0168
15+
table[p] = o;
16+
}
17+
}

samples/Basic/Assets/Scripts/Test04.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)