Closed
Description
Steps to reproduce:
- Create file
my_file.coco
containingdef 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 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'