Changeset 3803

Show
Ignore:
Timestamp:
06/05/09 08:26:41 (6 months ago)
Author:
EricAllen
Message:

Lifted method for checking existence of static parameters into general type environments.
Fixed client sites.

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/StaticParamTypeEnv.java

    r3796 r3803  
    7676        } 
    7777        return Option.none(); 
    78     } 
    79  
    80     public boolean bound(Id name) { 
    81         for ( StaticParam param : entries ) { 
    82             if ( param.getName().getText().equals(name.getText()) ) 
    83                 return true; 
    84         } 
    85         return false; 
    8678    } 
    8779 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeEnv.java

    r3721 r3803  
    255255 
    256256    /** 
     257     * Return true iff the given id is bound as a StaticParam.  
     258     */ 
     259    public boolean boundStaticParam(Id id) { return staticParam(id).isSome(); } 
     260 
     261    /** 
    257262     * Return the {@code Node} that declared the given id, or None if the id does not 
    258263     * exist. Note that this method should not be passed the id of a function, since 
  • trunk/ProjectFortress/src/com/sun/fortress/scala_src/typechecker/TypeWellFormedChecker.scala

    r3796 r3803  
    9595      case SBottomType(_) => // OK 
    9696      case t@SVarType(_, name, _) => 
    97         if ( analyzer.typeEnv.isInstanceOf[StaticParamTypeEnv] ) { 
    98           if ( ! analyzer.typeEnv.asInstanceOf[StaticParamTypeEnv].bound(name) ) 
    99             error("Unbound type: " + name, t) 
    100         } else error("Unbound type: " + name, t) 
     97        if (! analyzer.typeEnv.boundStaticParam(name)) { 
     98          error("Unbound type: " + name, t) 
     99        }  
    101100      case t@STraitType(_, name, sargs, _) => 
    102101        getTypes(name) match { 
  • trunk/README.txt

    r3711 r3803  
    187187known to work on Eclipse 3.4, and should work on Eclipse 3.3 as well. 
    188188These will change preferences for all your Eclipse projects. 
    189 Open up Window --> Preferences to start configuring your global 
     189Open up Eclipse Preferences to start configuring your global 
    190190settings. First select General --> Editors --> Text Editors 
    191191and make sure the checkbox is enabled for "Insert spaces for tabs".