Skip to content

Commit

Permalink
ignore rettags other than long and double
Browse files Browse the repository at this point in the history
  • Loading branch information
richhickey committed Aug 5, 2015
1 parent b38c23e commit 2344de2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions clojure.iml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager" />
<component name="FacetManager">
<facet type="Clojure" name="Clojure">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
Expand All @@ -21,5 +25,4 @@
<orderEntry type="library" scope="TEST" name="Maven: org.clojure:data.generators:0.1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.clojure:test.check:0.5.9" level="project" />
</component>
</module>

</module>
6 changes: 6 additions & 0 deletions src/jvm/clojure/lang/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -5295,6 +5295,12 @@ static FnMethod parse(ObjExpr objx, ISeq form, Object rettag) {
rettag = Symbol.intern(null, (String) rettag);
if(!(rettag instanceof Symbol))
rettag = null;
if(rettag != null)
{
String retstr = ((Symbol)rettag).getName();
if(!retstr.equals("long") || !retstr.equals("double"))
rettag = null;
}
method.retClass = tagClass(tagOf(parms)!=null?tagOf(parms):rettag);
if(method.retClass.isPrimitive()){
if(!(method.retClass == double.class || method.retClass == long.class))
Expand Down

0 comments on commit 2344de2

Please sign in to comment.