Closed MortimerSnerd closed 1 year ago
Mentioned this on the forum.
When doing a static type test with is, you get this error if the value is a struct type:
is
reprep.lobster(4): error: struct value cannot be used in `is` in reprep.lobster(10): do_something(a:xyz_f)->unknown { }
Example code:
import vec def do_something(a): if a is string: return "\"{a}\"" else: return string(a) print(do_something("asds")) print(do_something(xyz_0))
Not a high priority, I only ever noticed it when cleaning up a return value for a source file meant for run_compile_file().
Fixed: https://github.com/aardappel/lobster/commit/e0636214d54a1ded59c5cf8514164be65a855f6c
Mentioned this on the forum.
When doing a static type test with
is
, you get this error if the value is a struct type:reprep.lobster(4): error: struct value cannot be used in `is` in reprep.lobster(10): do_something(a:xyz_f)->unknown { }
Example code:
Not a high priority, I only ever noticed it when cleaning up a return value for a source file meant for run_compile_file().