Skip to content

Commit 402b5a1

Browse files
tzezulasteve-s
authored andcommitted
[GR-10977] Updated R types for TCK.
1 parent 5bff739 commit 402b5a1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

com.oracle.truffle.r.test.tck/src/com/oracle/truffle/r/test/tck/RTCKLanguageProvider.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
*/
2323
package com.oracle.truffle.r.test.tck;
2424

25+
import static org.graalvm.polyglot.tck.TypeDescriptor.array;
26+
import static org.graalvm.polyglot.tck.TypeDescriptor.intersection;
27+
2528
import java.io.IOException;
2629
import java.io.InputStreamReader;
2730
import java.io.Reader;
@@ -95,12 +98,12 @@ public Collection<? extends Snippet> createValueConstructors(Context context) {
9598
List<Snippet> vals = new ArrayList<>();
9699

97100
// Scalar types
98-
vals.add(createValueConstructor(context, "1L", TypeDescriptor.NUMBER));
99-
vals.add(createValueConstructor(context, "1.42", TypeDescriptor.NUMBER));
100-
vals.add(createValueConstructor(context, "FALSE", TypeDescriptor.BOOLEAN));
101-
vals.add(createValueConstructor(context, "'TEST'", TypeDescriptor.STRING));
102-
vals.add(createValueConstructor(context, "1+1i", TypeDescriptor.intersection())); // generic
103-
// type
101+
vals.add(createValueConstructor(context, "1L", intersection(TypeDescriptor.NUMBER, array(TypeDescriptor.NUMBER))));
102+
vals.add(createValueConstructor(context, "1.42", intersection(TypeDescriptor.NUMBER, array(TypeDescriptor.NUMBER))));
103+
vals.add(createValueConstructor(context, "FALSE", intersection(TypeDescriptor.BOOLEAN, array(TypeDescriptor.BOOLEAN))));
104+
vals.add(createValueConstructor(context, "'TEST'", intersection(TypeDescriptor.STRING, array(TypeDescriptor.STRING))));
105+
vals.add(createValueConstructor(context, "1+1i", intersection())); // generic
106+
// type
104107

105108
// TODO NULL, raw, s4, env, list, empty, ...
106109
// vals.add(createValueConstructor(context, "NULL", TypeDescriptor.NULL));

0 commit comments

Comments
 (0)