FAQ for HW4

Are the same name of field and method allowed.

The name for a field cannot be defined in current scope or in a superclass.  
The method cannot have already been defined in the current scope.
(This means that you could define a field "x" in a class, and then a method "x"
in a subclass, but most other situations this would be disallowed.   This is
a bug in the language design, but go ahead and implement it.)


Do we have to take program order into accoutn? e.g. if a field in a class
is declared after a method which is referencing that field in a class, should
it be allowed?

In this language, everything must be declared before it is used.

If the superclass is not visible for the class being declared, what node should
be returned, defn or classtype, since it depends on hwere you lookup the
symbol table, in the visidefn or visitclasstype.

This is an implementation detail that is up to you.   You can link a classtype
with its corresponding defn, then it doesn't really matter.