v1.0.26-alpha compiled from 075668b5 and master as of today (b546e427) both crash
What operating system are you using, and which version?
[ ] Linux / Ubuntu
[x] Linux / Other
[ ] macOS
[ ] Windows
Describe what the problem is?
Compiler crashes when compiling following code
fn not(x: Bool) -> Bool {
when x is {
True -> False
False -> True
}
}
type Identity<t> = t
test foo() {
let id: Identity<fn(Bool) -> Bool> = not
expect id.fst(True) // (sic!)
}
Error aiken::check::unknown::record_field
× While trying to make sense of your code...
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
If you modify foo to use 1st instead of fst (still incorrect, I know) it stack overflows again but with different error
× While trying to make sense of your code...
╰─▶ I tripped over an attempt to access elements on something that isn't indexable.
╭─[/home/t4ccer/repos/github/aiken-lang/aiken/examples/acceptance_tests/foo/lib/tests.ak:18:1]
18 │ let id: Identity<fn(Bool) -> Bool> = not
19 │ expect id.1st(True)
· ──────
20 │ }
╰────
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
What should be the expected behavior?
Compiler does not crash, tells user that you cannot access a field on type synonym of a function.
What Git revision are you using?
v1.0.26-alpha
compiled from 075668b5 and master as of today (b546e427) both crashWhat operating system are you using, and which version?
Describe what the problem is?
Compiler crashes when compiling following code
If you modify
foo
to use1st
instead offst
(still incorrect, I know) it stack overflows again but with different errorWhat should be the expected behavior?
Compiler does not crash, tells user that you cannot access a field on type synonym of a function.