Disallow coercion to/from char[] and any[].
This commit is contained in:
@@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user