You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create file my_file.coco containing def fun0(a: str, b) = 'foo'.
Open latest coconut REPL (v1.6.0) and enter import my_file.
Note the REPL crashes with error CoconutSyntaxError: non-default arguments must come first or after star argument/separator.
This is a REPL issue only: coconut my_file.coco compiles and runs without issue. I can't figure out the exact pattern of typed and untyped arguments that cause the crash, but here's all combinations of 2 and 3-arugment functions:
REPL crashes on import
def fun01(a: str, b) = 'foo'
def fun05(a: str, b, c) = 'foo'
def fun06(a, b: str, c) = 'foo'
def fun08(a: str, b: str, c) = 'foo'
def fun09(a: str, b, c: str) = 'foo'
The text was updated successfully, but these errors were encountered:
tom-a-horrocks
changed the title
Coconut REPL crashes when importing certain functions having typed and untyped arguments.
Coconut REPL crashes when importing some functions with mixed typed and untyped arguments.
Aug 12, 2022
Steps to reproduce:
my_file.coco
containingdef fun0(a: str, b) = 'foo'
.import my_file
.This is a REPL issue only:
coconut my_file.coco
compiles and runs without issue. I can't figure out the exact pattern of typed and untyped arguments that cause the crash, but here's all combinations of 2 and 3-arugment functions:REPL imports without issue
def fun00(a, b) = 'foo'
def fun02(a, b: str) = 'foo'
def fun03(a: str, b: str) = 'foo'
def fun04(a, b, c) = 'foo'
def fun07(a, b, c: str) = 'foo'
def fun10(a, b: str, c: str) = 'foo'
def fun11(a: str, b: str, c: str) = 'foo'
REPL crashes on import
def fun01(a: str, b) = 'foo'
def fun05(a: str, b, c) = 'foo'
def fun06(a, b: str, c) = 'foo'
def fun08(a: str, b: str, c) = 'foo'
def fun09(a: str, b, c: str) = 'foo'
The text was updated successfully, but these errors were encountered: