Changeset 3292
- Timestamp:
- 01/07/09 18:53:22 (6 months ago)
- Files:
-
- trunk/ProjectFortress/build.xml (modified) (2 diffs)
- trunk/ProjectFortress/src/com/sun/fortress/compiler/CompilerJUTest.scala (modified) (2 diffs)
- trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java (modified) (3 diffs)
- trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeNormalizer.java (added)
- trunk/ProjectFortress/src/com/sun/fortress/interpreter/glue/WellKnownNames.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ProjectFortress/build.xml
r3244 r3292 77 77 <!-- Scala jar files --> 78 78 <property name="scala-compiler.jar" 79 value="${basedir}/third_party/scala/scala-compiler-2.7. 1.jar"/>79 value="${basedir}/third_party/scala/scala-compiler-2.7.3.jar"/> 80 80 <property name="scala-library.jar" 81 value="${basedir}/third_party/scala/scala-library-2.7. 1.jar"/>81 value="${basedir}/third_party/scala/scala-library-2.7.3.jar"/> 82 82 83 83 <!-- ASTGen --> … … 488 488 </target> 489 489 490 <target name="compileAll" depends="c ompile"490 <target name="compileAll" depends="clean, compileCommon, makeAST, parser, operatorsGen" 491 491 description="Compile all Fortress code."> 492 <javac 493 srcdir="${src}" 494 destdir="${build}" 495 source="1.5" 496 debug="true" 497 includeantruntime="false" 498 fork="true" 499 memorymaximumsize="${junitMem}"> 500 <!-- Uncomment the following line to print unchecked warnings 501 (here and in the 'compileCommon' target. --> 502 <!-- <compilerarg value="-Xlint:unchecked"/> --> 503 <classpath refid="compile.classpath"/> 504 <include name="**/*.java"/> 505 <exclude name="${usefulPackage}/*.java"/> 506 <exclude name="${unicodePackage}/*.java"/> 507 </javac> 492 508 <scalac 493 509 srcdir="${src}" trunk/ProjectFortress/src/com/sun/fortress/compiler/CompilerJUTest.scala
r3277 r3292 1 1 /******************************************************************************* 2 Copyright 200 8Sun Microsystems, Inc.,2 Copyright 2009 Sun Microsystems, Inc., 3 3 4150 Network Circle, Santa Clara, California 95054, U.S.A. 4 4 All rights reserved. … … 172 172 } 173 173 174 def testXXXCompiled13() = { 175 val expected = 176 STATIC_TESTS_DIR + "/XXXCompiled13.fss:20:3-35\n" + 177 " Function body has type FlatString->(), but declared return type is ()" 178 Shell.assertStaticErrors(compile("XXXCompiled13.fss"), expected) 179 } 180 181 174 182 def testXXXCompiled14() = { 175 183 val expected = trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java
r3272 r3292 86 86 import edu.rice.cs.plt.tuple.Pair; 87 87 import edu.rice.cs.plt.tuple.Triple; 88 89 import static com.sun.fortress.compiler.typechecker.TypeNormalizer.normalize; 88 90 89 91 /** … … 923 925 else { 924 926 String err = "Applicable overloading of function " + that.getFunction() + 925 " could not be found for argument type " + argument_result.type(); // error message needs work927 " could not be found for argument type " + normalize(argument_result.type().unwrap()); // error message needs work 926 928 result = new TypeCheckerResult(that, TypeError.make(err, that)); 927 929 result_type = Option.none(); … … 2346 2348 // } 2347 2349 // System.err.println("equal? " + bodyType.equals(returnType.unwrap())); 2348 result = newChecker.checkSubtype( bodyType,2349 returnType.unwrap(),2350 that,2351 errorMsg("Function body has type ", bodyType, ", but ",2352 "declared return type is ", returnType.unwrap()));2350 result = newChecker.checkSubtype(normalize(bodyType), 2351 normalize(returnType.unwrap()), 2352 that, 2353 errorMsg("Function body has type ", normalize(bodyType), ", but ", 2354 "declared return type is ", normalize(returnType.unwrap()))); 2353 2355 } 2354 2356 trunk/ProjectFortress/src/com/sun/fortress/interpreter/glue/WellKnownNames.java
r3242 r3292 36 36 } 37 37 38 private static String _compilerLibrary = "CompilerLibrary"; 39 private static String _compilerBuiltin = "CompilerBuiltin"; 38 40 private static String _fortressLibrary = "FortressLibrary"; 39 41 private static String _fortressBuiltin = "FortressBuiltin"; … … 76 78 public final static String labelException = "LabelException"; 77 79 80 public static String compilerLibrary() { return _compilerLibrary; } 81 public static String compilerBuiltin() { return _compilerBuiltin; } 78 82 public static String fortressLibrary() { return _fortressLibrary; } 79 83 public static String fortressBuiltin() { return _fortressBuiltin; }
