#  more test of error messages, not yet classified

% incompatible bounds
	resource main()
	int array[2.3:0]
	end

% location is not a vm cap
	resource main()
	int n
	create main() on n
	end

% non-string concatenation
	resource main()
	int  n
	real  f
	n || f
	end

% invalid co-invocation
	resource main()
	co sin(3) oc
	end

% destroy object is not a capability
	resource main()
	destroy main
	end

% illegal parameter type for external
	resource main()
	op p()
	cap p  q
	external backend (cap p q)
	proc p()  {
	}
	end

% illegal parameter type for external
	resource main()
	op p()
	cap p  q
	external backend (ref cap p q)
	proc p()  {
	}
	end

% no restrictions allowed on external
	resource main()
	external backend () {call}
	end

% illegal return type for external
	resource main()
	external backend (string[*] path) returns real ta[2:2]
	end

% duplicate .final. code
	resource main()
	final {
	}
	final {
	}
	end

% forward to incompatible op
	resource main()
	op request(int t) returns int  z
	op r(char t) returns char  z
	proc request(t) returns z  {
	forward r('c')
	}
	proc r(t) returns z  {
	}
	end

% forward: not allowed outside a proc
	resource main()
	op r()
	forward r()
	proc r()  {
	}
	end

% forward: op is restricted {call}
	resource main()
	op f()  {call}
	op request() {call}
	proc request()  {
	forward f()
	}
	proc f()  {
	}
	end

% low/high: not an ordered type
	resource main()
	type str =  string[2]
	str  s
	low(str)
	end

% a proc cannot implement an array op
	resource main()
	op f[2]()
	proc f()  {
	}
	end

% incorrect subscripting of p
# tried to slice it
	resource r
	op p[4] (int)
	body r ()
	process pp  [ i = 1 to 4 ] {
	in p[i:3](n) -> write ("p", i, ":", n) ni
	}
	end

% receive: argument 1 is incompatible
	resource rcv1()
	op p(int x)
	string[2] z
	receive p(z)
	end

% non-constant array bounds in spec or record
	resource main()
	int  k
	type point = rec(int y[1:k]); ptr point  a 
	a = new(point)
	end

% non-constant string length in spec or record
	resource main()
	int  k
	type point = rec(string[k] y); ptr point  a 
	a = new(point)
	end

% cannot swap into or out of a slice
	resource main()
	int  array[1:4] 
	array[1:2] :=: array[2:3]
	end

% incompatible slice indices
	resource main()
	int  array[1:4] 
	array[1.0:2] = array[2:3]
	end

% wrong subscript type
	resource main()
	int  array[1:4] 
	array[1:2.0] = array[2:3]
	end

% both sides of swap operator must be variables
	resource main()
	int n
	n :=: 4
	end

% sync expr must be boolean expression
	resource r ()
	op p ()
	in p() st 45 -> write ("p") ni
	end

% no arguments allowed in .create vm().
	resource main()
	create vm(3)
	end


% non-string concatenation
	resource main()
	int  n
	n ||= 5
	end

% not an op: x
	resource main()
	int  x
	receive x()
	end

% ambigous: don.t know what kind of null/noop
	resource main()
	cap vm x[2] = (null,noop)
	end

% non-integer shift operand
	resource main()
	int  v
	v = v << 4.4
	end

% incompatible swap
	resource main()
	int  v
	v:=:"e"
	end

% increment/decrement: not an ordered type
	resource main()
	string[3] v
	v--
	end

% non-integer shift operand
	resource main()
	real  v
	v <<= v
	end

% maxlength is not an integer
	resource main()
	string[.3] v
	end

% single bound is not integer
	resource main()
	real v[.3]
	end

% non-numeric exponentiation operand
	resource main()
	"s" ** 2
	end

% NOT operand is not bool or int
	resource main()
	real  v
	v=~v
	end

% incompatible pointer subtraction
	resource main()
	type point = rec(int y[1:2]); ptr point  a 
	a - 3.3
	end

% illegal or mismatched and/or/xor operands
	resource main()
	type point = rec(int y[1:2]); ptr point  a 
	a & a
	end

% dereference object is not a pointer
	resource main()
	bool  s
	s^
	end


% unary +/- operand is not simple numeric
	 resource main()
	string[2] v
	-v[2]
	end

% subscripted object is not an array
	#note, this is given twice
	resource main()
	bool  s
	s[2:3] :=: s[2:3]
	end

% vm location is neither integer nor string
	resource main()
	bool  s
	create vm() on s
	end

% element 3 of constructor is incompatible
	resource main()
	[3]int a = (1,2,"s")
	end

% too many subscripts
	#two times
	resource main()
	real s[3:4]
	s[3:3,3:4] :=: s[3:3,4:4]
	end

% non-numeric operand or incompatible assignm
	resource main()
	real  s
	s*="s"
	end

% illegal or mismatched and/or/xor operands
	resource main()
	real  s
	s&="s"
	end

% too many subscripts
	resource main()
	string[4] s
	s[3:3,3:4] :=: s[3:3,4:4]
	end

% comment terminator outside comment
	*/
	resource main()
	end

% illegal character .$.
	resource main()
	$
	end

% circle: type never defined
	resource main()
	ptr circle  s
	end

% exp(): too many arguments
	resource main()
	exp(3,3,3,4)
	end

% exp(): too few arguments
	resource main()
	exp()
	end

% unterminated string
	resource main()
	string[20] s
	s = "s
	end

% empty character literal
	resource main()
	char  c
	c = ''
	end

% illegal context for .*. as array bound
	resource main()
	type array = [*] int
	ptr array  b
	b = new(array)
	end

% cannot pass slice expression to ref parameter
	resource main()
	op p(ref int x[1:2])
	int  s[1:2]
	p(s[1:2])
	proc p(x)  {
	}
	end

% both bounds are .*.
	resource main()
	op p(int b[*:*])
	proc p(b)  {
	}
	end

% character literal contains multiple characters
	resource main()
	char  c
	c = 'kd
	'
	end

% newline in character literal
	resource main()
	char  c
	c ='
	'
	end

% too few arguments
	resource main()
	printf(stderr)
	end

% unknown field: c
	resource main ()
	rec (int a, b) r
	r.c
	end

% no enclosing loop
	resource main()
	next
	end

% invalid type
	resource main()
	int  s[1:2,4:5]
	write(s[1:3,4:3])
	end

% repetition count is not an integer
	resource r ()
	int v[5] = (["foo"] 273)
	end

% can.t use .noop. in pointer context
	resource r ()
	ptr any  p = noop
	end

% duplicate implementation of p
	resource main()
	op p()
	proc p()  {
	}
	receive p()
	end

% undefined identifier: f
	resource r ()
	create f()
	end

% undefined identifier: y
	resource a
	import b
	const int x = y + 3
	end
	resource b
	import a
	const int y = x - 2
	body b ()
	a.x
	end

% invalid type
	resource main()
	string[2] s
	pred(s)
	end

% illegal type for conversion
	resource main()
	chars(noop)
	end

% seektype argument is wrong type
	resource main()
	seek(noop,noop,2)
	end

% unterminated comment at EOF
	resource main()
	end
	/*

% recursively defined record
	resource r ()
	type obj = rec (obj o )
	end
