Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SO when attempting to subtract from a Day value #11119

Closed
hubertp opened this issue Sep 17, 2024 · 3 comments · Fixed by #11122
Closed

SO when attempting to subtract from a Day value #11119

hubertp opened this issue Sep 17, 2024 · 3 comments · Fixed by #11122
Assignees
Labels
-compiler -libs Libraries: New libraries to be implemented

Comments

@hubertp
Copy link
Collaborator

hubertp commented Sep 17, 2024

Simple reproducer failing with StackOverflowError:

from Standard.Base import all

main =
    d = Date.today
    d - d

Screenshot from 2024-09-17 17-48-14

Date.today was obviously 2024-09-17

@hubertp hubertp added the -libs Libraries: New libraries to be implemented label Sep 17, 2024
@jdunkerley
Copy link
Member

Date.- does not allow a Date argument as the amount and should hence fail with a type error.

- self amount:(Period | Date_Period)

@JaroslavTulach
Copy link
Member

Looking at the stack:

ReadArgumentCheckNode.panicAtTheEnd() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/argument/ReadArgumentCheckNode.java:135)
ReadArgumentCheckNode.handleCheckOrConversion() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/argument/ReadArgumentCheckNode.java:76)
ReadArgumentNode.executeGeneric() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/argument/ReadArgumentNode.java:72)
AssignmentNodeGen.executeGeneric() (/enso/engine/runtime/target/scala-2.13/src_managed/main/org/enso/interpreter/node/scope/AssignmentNodeGen.java:51)
BinaryOperatorNode.executeGeneric() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/BinaryOperatorNode.java:44)
ClosureRootNode.execute() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/ClosureRootNode.java:85)
OptimizedCallTarget.executeRootNode() (Unknown Source:745)
OptimizedCallTarget.profiledPERoot() (Unknown Source:669)
OptimizedCallTarget.callBoundary() (Unknown Source:602)
OptimizedCallTarget.doInvoke() (Unknown Source:586)
OptimizedCallTarget.callDirect() (Unknown Source:535)
OptimizedDirectCallNode.call() (Unknown Source:94)
ExecuteCallNode.callDirect() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/ExecuteCallNode.java:94)
ExecuteCallNodeGen.executeCall() (/enso/engine/runtime/target/scala-2.13/src_managed/main/org/enso/interpreter/node/callable/ExecuteCallNodeGen.java:86)
SimpleCallOptimiserNode.executeDispatch() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/dispatch/SimpleCallOptimiserNode.java:56)
CurryNode.doCall() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/dispatch/CurryNode.java:161)
CurryNode.execute() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/dispatch/CurryNode.java:107)
InvokeFunctionNode.invokeCached() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/callable/dispatch/InvokeFunctionNode.java:155)
InvokeFunctionNodeGen.execute() (/enso/engine/runtime/target/scala-2.13/src_managed/main/org/enso/interpreter/node/callable/dispatch/InvokeFunctionNodeGen.java:81)
BinaryOperatorNode$DoThatConversionNode.doDispatch() (/enso/engine/runtime/src/main/java/org/enso/interpreter/node/BinaryOperatorNode.java:195)

I'd say this is a regression caused by

@JaroslavTulach JaroslavTulach self-assigned this Sep 18, 2024
@JaroslavTulach JaroslavTulach moved this from ❓New to 👁️ Code review in Issues Board Sep 18, 2024
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Sep 18, 2024
@enso-bot
Copy link

enso-bot bot commented Sep 19, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-09-18):

Progress: .

Next Day: I'll be at GraalVM meetup; coding intermitently

Discord
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler -libs Libraries: New libraries to be implemented
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants