Disallow coercion to/from char[] and any[].

This commit is contained in:
David Anderson
2014-12-14 02:00:58 -08:00
parent 5a814c40b3
commit bab1110bc0
9 changed files with 57 additions and 3 deletions
@@ -0,0 +1,7 @@
public main()
{
char x[40];
any y[10];
x = y;
y = x;
}
@@ -0,0 +1,2 @@
(5) : error 179: cannot assign char[] to any[], storage classes differ
(6) : error 179: cannot assign any[] to char[], storage classes differ
@@ -0,0 +1,9 @@
f(any[] x)
{
}
public main()
{
char x[10];
f(x[1]);
}
@@ -0,0 +1 @@
(8) : error 178: cannot coerce char[] to any[]; storage classes differ
@@ -0,0 +1,9 @@
f(any[] x)
{
}
public main()
{
char x[10];
f(x);
}
@@ -0,0 +1 @@
(8) : error 178: cannot coerce char[] to any[]; storage classes differ
@@ -1,3 +1,7 @@
methodmap X {
public native void egg(any ...);
};
public main()
{
}