diff --git a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/operations/contributors/NumberOperationContributor.java b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/operations/contributors/NumberOperationContributor.java index cfd7e2b59..4cc5e7d1c 100644 --- a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/operations/contributors/NumberOperationContributor.java +++ b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/operations/contributors/NumberOperationContributor.java @@ -11,7 +11,7 @@ import java.util.stream.LongStream; -import org.eclipse.epsilon.eol.staticanalyser.types.EolPrimitiveType; +import org.eclipse.epsilon.eol.staticanalyser.types.EolNativeType; import org.eclipse.epsilon.eol.staticanalyser.types.EolType; import org.eclipse.epsilon.eol.types.NumberUtil; @@ -22,10 +22,9 @@ public boolean contributesTo(Object target) { return target instanceof Number; } - //TODO Replace this with EolNativeType @Override public EolType contributesToType() { - return EolPrimitiveType.Integer; + return new EolNativeType(Number.class); } @Override diff --git a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/staticanalyser/EolStaticAnalyser.java b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/staticanalyser/EolStaticAnalyser.java index 4bf266659..ccdba67a0 100644 --- a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/staticanalyser/EolStaticAnalyser.java +++ b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/staticanalyser/EolStaticAnalyser.java @@ -1247,6 +1247,22 @@ public EolType javaClassToEolType(Class javaClass) { return EolCollectionType.Set; } else if (javaClass == java.util.Map.class) { return EolMapType.Map; + } else if (javaClass == org.eclipse.epsilon.eol.types.EolCollection.class) { + return EolCollectionType.Collection; + } else if (javaClass == org.eclipse.epsilon.eol.types.EolBag.class) { + return EolCollectionType.Bag; + } else if (javaClass == org.eclipse.epsilon.eol.types.EolSequence.class) { + return EolCollectionType.Sequence; + } else if (javaClass == org.eclipse.epsilon.eol.types.EolSet.class) { + return EolCollectionType.Set; + } else if (javaClass == org.eclipse.epsilon.eol.types.EolOrderedSet.class) { + return EolCollectionType.OrderedSet; + } else if (javaClass == org.eclipse.epsilon.eol.types.concurrent.EolConcurrentBag.class) { + return EolCollectionType.ConcurrentBag; + } else if (javaClass == org.eclipse.epsilon.eol.types.concurrent.EolConcurrentSet.class) { + return EolCollectionType.ConcurrentSet; + } else if (javaClass == org.eclipse.epsilon.eol.types.concurrent.EolConcurrentMap.class) { + return EolMapType.ConcurrentMap; } else { return new EolNativeType(javaClass); } diff --git a/tests/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/RealOperationContributor.eol b/tests/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/RealOperationContributor.eol index 648c03b15..32e8e2841 100644 --- a/tests/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/RealOperationContributor.eol +++ b/tests/org.eclipse.epsilon.eol.staticanalyser.tests/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/RealOperationContributor.eol @@ -6,6 +6,4 @@ /*Native*/1.1.max(2.2); /*Native*/1.1.min(2.2); /*Native*/1.1.pow(2.2); -/*Integer*/1.1.round(); - - +/*Integer*/1.1.round(); \ No newline at end of file