Kludge to fix classes/deitz/test_type_in_class2
Kludge to fix classes/deitz/test_type_in_class2

The problem is a bit of a disconnect about UserTypes
and type variables.  Here is the test:

*******************************************************
class node {
  type element_type : integer;
  var element : element_type;
}

var n : node = node();

n.element = 12;

writeln(n.element);
*******************************************************

Is 'element_type'is a type variable is being constrained to be some
subtype of integer, and it "node" a generic type ?

I would say "yes". And:

*******************************************************
class C { ... }
class B : C { ... }

class node {
  type element_type : C;
  var element : element_type;
}

var n : node = node(element_type = B);

n.element = B();

writeln(n.element);
*******************************************************

is reasonable code which instantiates 'node' with B,
some subtype of C.

Now it so happens that 'integer' can't have subtypes
(at least that is my current understanding),
so it is possible to recognize this case and remove
or at least default the type variable parameter variable
'element_type'.

However the compiler treats 'element_type' in both cases
as UserType which it probably shouldn't.

At least that is my take on it.


git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@2641 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,hildeth/chapel,hildeth/chapel,chizarlicious/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,sungeunchoi/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,chizarlicious/chapel