-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expression update contains full multi-value info (#12195)
close #12153
- Loading branch information
Showing
13 changed files
with
161 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
engine/runtime-instrument-common/src/main/java/org/enso/interpreter/instrument/TypeInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.enso.interpreter.instrument; | ||
|
||
import java.util.Arrays; | ||
|
||
/** | ||
* The type information observed by the instrumentation. | ||
* | ||
* <p>The list in the type definition represents an intersection type. A list with a single element | ||
* represents a simple type. | ||
* | ||
* @param visibleType the public type of the value visible to the user | ||
* @param hiddenType the list of types the value can be converted to | ||
*/ | ||
public record TypeInfo(String[] visibleType, String[] hiddenType) { | ||
|
||
public static TypeInfo ofType(String typeName) { | ||
return new TypeInfo(new String[] {typeName}, new String[0]); | ||
} | ||
|
||
public static TypeInfo ofIntersectionType(String[] intersectionType) { | ||
return new TypeInfo(intersectionType, new String[0]); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "TypeInfo(" + Arrays.toString(visibleType) + "," + Arrays.toString(hiddenType) + ")"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.