Skip to content

Commit 2e743ca

Browse files
committed
fix: undeclared enum case error due to file order within a module
1 parent fe28f6c commit 2e743ca

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.0.16-next
4+
5+
- fix: undeclared enum case error due to file order within a module
6+
37
## v0.0.15
48

59
- stdlib: removed `docs.moduleMemberDocsToMarkup`, `docs.dataFieldDocsToMarkup` and `docs.enumCaseDocsToMarkup` and marked them as internal

info/globals.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package info
22

3-
var Version = "0.0.15"
3+
var Version = "0.0.16-next"

runtime/runtime-value-decl.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ func MakeRuntimeValueDecl(context *InterpreterContext, decl ast.Decl) (Evaluatab
1313
case ast.DeclData:
1414
return NewConstantRuntimeValue(PreludeDataDecl{Decl: decl}), nil
1515
case ast.DeclEnum:
16-
enumDecl, err := MakeEnumDecl(context, decl)
17-
if err != nil {
18-
return nil, err
19-
}
20-
return NewConstantRuntimeValue(enumDecl), nil
16+
return NewLazyRuntimeValue(func() (RuntimeValue, *RuntimeError) {
17+
enumDecl, err := MakeEnumDecl(context, decl)
18+
if err != nil {
19+
return nil, err
20+
}
21+
return enumDecl, nil
22+
}), nil
2123
case ast.DeclFunc:
2224
value, err := MakePreludeFuncDecl(context, decl)
2325
if err != nil {
File renamed without changes.
File renamed without changes.

stdlib/rx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Planned to propagate value changes to observers, but not implemented, yet.
1414

1515
### Properties
1616

17-
- `accept value` - Changes the currently hold value of the variable.
1817
- `current` - Returns the currently hold value.
18+
- `accept value` - Changes the currently hold value of the variable.
1919

0 commit comments

Comments
 (0)