system/src/sc/lang/java/ConstructorDefinition.java
public Object findType(String typeName, Object refType, TypeContext context) {
      if (objectConstructor) {
         TypeDeclaration td;
         if ((td = getEnclosingType()).typeName.equals(typeName)) {
            System.err.println("**** Illegal access to object of type: " + typeName + " from within its constructor: " + toDefinitionString());
            return td;
         }
      }
      return super.findType(typeName, refType, context);
   }
/**
    * If you happen to refer to an object in the constructor it leads to an infinite loop which is a pain
    * so here we flag that as an error and don't hook up the reference.
    */
If you happen to refer to an object in the constructor it leads to an infinite loop which is a pain
so here we flag that as an error and don't hook up the reference.
If you happen to refer to an object in the constructor it leads to an infinite loop which is a pain so here we flag that as an error and don ' t hook up the reference .
public Object findType(String typeName, Object refType, TypeContext context) {
      if (objectConstructor) {
         TypeDeclaration td;
         if ((td = getEnclosingType()).typeName.equals(typeName)) {
            System.err.println("**** Illegal access to object of type: " + typeName + " from within its constructor: " + toDefinitionString());
            return td;
         }
      }
      return super.findType(typeName, refType, context);
   }
public Object findType ( String typeName , Object refType , TypeContext context ) { if ( objectConstructor ) { TypeDeclaration td ; if ( ( td = getEnclosingType ( ) ) . typeName . equals ( typeName ) ) { System . err . println ( "**** Illegal access to object of type: " + typeName + " from within its constructor: " + toDefinitionString ( ) ) ; return td ; } } return super . findType ( typeName , refType , context ) ; }
If you happen to refer to an object in the constructor it leads to an infinite loop which is a pain
 so here we flag that as an error and don't hook up the reference.
If you happen to refer to an object in the constructor it leads to an infinite loop which is a pain so here we flag that as an error and don ' t hook up the reference .