Changeset 2105

Show
Ignore:
Timestamp:
06/26/08 12:49:29 (5 months ago)
Author:
nbeckman
Message:

Fixed tests that were not passing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/StaticJUTest.java

    r2103 r2105  
    3939    ); 
    4040    private final static List<String> FAILING_TYPE_CHECKER = Arrays.asList( 
    41         "GenericFunctionCall.fss", 
    42         "CrossOverloaded.fss", 
    43         "SimpleObject.fss", 
    44         "MutualLetFn.fss", 
    45         "DXXMutualSeparateLetFn.fss", 
    4641        "XXXMultipleRefErrors.fss", 
    4742        "XXXUndefinedArrayRef.fss", 
     
    5146        "XXXUndefinedVar.fss", 
    5247        "XXXUndefinedTopLevelVar.fss", 
    53         "Sum.fss", 
     48        // This test the accumulator which is not desugared yet 
     49         "Sum.fss", 
    5450        //These are broken until the constraint solver is fixed 
    5551        "GeneratorTest.fss", 
     
    6662    } 
    6763} 
    68 //"GenericSingleton.fss"      // FIXME 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java

    r2104 r2105  
    643643        TypeCheckerResult modsResult = TypeCheckerResult.compose(that, subtypeChecker, recurOnListOfModifier(that.getMods())); 
    644644        TypeCheckerResult nameResult = that.getName().accept(this); 
    645         TypeCheckerResult staticParamsResult = TypeCheckerResult.compose(that, subtypeChecker, recurOnListOfStaticParam(that.getStaticParams())); 
    646645        TypeCheckerResult extendsClauseResult = TypeCheckerResult.compose(that, subtypeChecker, recurOnListOfTraitTypeWhere(that.getExtendsClause())); 
    647646        TypeCheckerResult whereResult = that.getWhere().accept(this); 
     
    684683 
    685684        return TypeCheckerResult.compose(that, subtypeChecker, modsResult, nameResult, 
    686                                          staticParamsResult, extendsClauseResult, whereResult, paramsResult, 
     685                                         extendsClauseResult, whereResult, paramsResult, 
    687686                                         throwsClauseResult, contractResult, fieldsResult, methodsResult); 
    688687    } 
     
    732731        public TypeCheckerResult forTraitDecl(TraitDecl that) { 
    733732        TypeCheckerResult modsResult = TypeCheckerResult.compose(that, subtypeChecker, recurOnListOfModifier(that.getMods())); 
    734         TypeCheckerResult staticParamsResult = TypeCheckerResult.compose(that, subtypeChecker, recurOnListOfStaticParam(that.getStaticParams())); 
    735733        TypeCheckerResult extendsClauseResult = TypeCheckerResult.compose(that, subtypeChecker, recurOnListOfTraitTypeWhere(that.getExtendsClause())); 
    736734        TypeCheckerResult whereResult = that.getWhere().accept(this); 
     
    778776 
    779777        return TypeCheckerResult.compose(that, subtypeChecker, modsResult, 
    780                                          staticParamsResult, extendsClauseResult, whereResult, excludesResult, 
     778                                         extendsClauseResult, whereResult, excludesResult, 
    781779                                         comprisesResult, fieldsResult, methodsResult); 
    782780    } 
     
    32743272                List<MathItem> items = IterUtil.asList(IterUtil.map(rest, new Lambda<Expr,MathItem>(){ 
    32753273                        public MathItem value(Expr arg0) { 
    3276                                 if( arg0.isParenthesized() || arg0 instanceof TupleExpr
     3274                                if( arg0.isParenthesized() || arg0 instanceof TupleExpr || arg0 instanceof VoidLiteralExpr
    32773275                                        return new ParenthesisDelimitedMI(arg0.getSpan(),arg0); 
    32783276                                else 
  • trunk/ProjectFortress/static_tests/CrossOverloaded.fss

    r1539 r2105  
    2121export Executable 
    2222 
    23   run(args) = do 
    24     10 * false 
    25     true * 5 
    26     +false 
    27     false+ 
     23  run(args: String ...): () = () 
     24   
     25  blah(a:ZZ32, b:ZZ32): () = do 
     26    ignore(a * false) 
     27    ignore(true * b) 
     28    ignore(+false) 
     29    ignore(false+) 
    2830  end 
    2931 
  • trunk/ProjectFortress/static_tests/GenericFunctionCall.fss

    r1454 r2105  
    1919export Executable 
    2020 
    21 object A[\T, int n\]() end 
    22 object B[\T, U, V\]() end 
     21  object A[\T, int n\]() end 
     22  object B[\T, U, V\]() end 
     23  f[\T\](x:T):T = x 
     24  g[\T, int n\](a:A[\T, n \]):A[\T,n\] = a 
     25  h[\T, U, V\](b:B[\V, U, T\]):() = () 
     26   
     27  run(args:String...):() = () 
    2328 
    24 f[\T\](x:T):T = x 
    25 g[\T, int n\](a:A[\T, n+1\]):A[\T,n\] = a 
    26 h[\T, U, V\](b:B[\V, U, T\]):() = () 
    27    
    28 run(args:String...):() = do 
    29   a = A[\String, 5\]() 
    30   b = B[\Boolean, ZZ32, String\]() 
    31   f[\String\]("asd") 
    32   g[\String, 5\](a) 
    33   h[\String, ZZ32, Boolean\](b) 
    34 end 
     29  blah[\ int c \]():() = do 
     30    a = A[\String, c\]() 
     31    b = B[\Boolean, ZZ32, String\]() 
     32    ignore(f[\String\]("asd")) 
     33    ignore(g[\String, c\](a)) 
     34    h[\String, ZZ32, Boolean\](b) 
     35  end 
    3536 
    3637end 
  • trunk/ProjectFortress/static_tests/MutualLetFn.fss

    r1355 r2105  
    2121(* Tests that mutually recursive local function definitions work as intended. *) 
    2222   
    23 run(args:String...):() = do 
    24   odd(x:ZZ32):Boolean = if x = 1 then true else even(x-1) end 
    25   even(x:ZZ32):Boolean = if x = 0 then true else odd(x-1) end 
    26   odd(5) 
    27 end 
     23  run(args:String...):() = () 
     24   
     25  blah(b:ZZ32, one:ZZ32):Boolean = do 
     26    odd(x:ZZ32, one: ZZ32):Boolean = if x = 1 then true else even(x-one,one) end 
     27    even(x:ZZ32, one:ZZ32):Boolean = if x = 0 then true else odd(x-one,one) end 
     28    odd(b,one) 
     29  end 
    2830 
    2931end