mlscript icon indicating copy to clipboard operation
mlscript copied to clipboard

Optional Arguments

Open noordahx opened this issue 1 year ago • 0 comments

Draft PR:

  • Resolved merge conflicts of original PR
  • Tests failed at OptionalArgs.mls
fun f1(a: Int, b: Int) = a + b
//│ ╔══[ERROR] Type mismatch in operator application:
//│ ║  l.17: 	fun f1(a: Int, b: Int) = a + b
//│ ║        	                         ^^^^^
//│ ╟── type `()` is not an instance of type `Int`
//│ ║  l.17: 	fun f1(a: Int, b: Int) = a + b
//│ ║        	          ^^^
//│ ╟── but it flows into reference with expected type `Int`
//│ ║  l.17: 	fun f1(a: Int, b: Int) = a + b
//│ ╙──      	                         ^
//│ TEST CASE FAILURE: There was an unexpected type error
//│ fun f1: (a: Int | (), b: Int | ()) -> (Int | error)

noordahx avatar Apr 22 '24 05:04 noordahx