File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
src/basilisp/lang/compiler Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
30
* Fix a bug where names ` def ` 'ed without reader metadata would cause the compiler to throw an exception (#850 )
31
31
* Fix an issue where ` concat ` on maps was iterating over the keys instead of the key/value pairs (#871 )
32
32
* Fix a bug where the compiler would throw an exception partially macroexpanding forms with ` recur ` forms provided as arguments (#856 )
33
+ * Fix a bug where the original ` (var ...) ` form is not retained during analysis, causing it to be lost in calls to ` macroexpand ` (#888 )
33
34
34
35
## [ v0.1.0b1]
35
36
### Added
Original file line number Diff line number Diff line change @@ -1703,7 +1703,9 @@ def __deftype_and_reify_impls_are_all_abstract( # pylint: disable=too-many-loca
1703
1703
"and cannot be checked for abstractness; deferring to runtime" ,
1704
1704
)
1705
1705
unverifiably_abstract .add (interface )
1706
- if _is_artificially_abstract (interface .form ):
1706
+ if isinstance (interface .form , IMeta ) and _is_artificially_abstract (
1707
+ interface .form
1708
+ ):
1707
1709
artificially_abstract .add (interface )
1708
1710
continue
1709
1711
@@ -1745,7 +1747,9 @@ def __deftype_and_reify_impls_are_all_abstract( # pylint: disable=too-many-loca
1745
1747
)
1746
1748
1747
1749
all_interface_methods .update (interface_names )
1748
- elif _is_artificially_abstract (interface .form ):
1750
+ elif isinstance (interface .form , IMeta ) and _is_artificially_abstract (
1751
+ interface .form
1752
+ ):
1749
1753
# Given that artificially abstract bases aren't real `abc.ABC`s and do
1750
1754
# not annotate their `abstractmethod`s, we can't assert right now that
1751
1755
# any the type will satisfy the artificially abstract base. However,
@@ -3197,7 +3201,7 @@ def _var_ast(form: ISeq, ctx: AnalyzerContext) -> VarRef:
3197
3201
raise ctx .AnalyzerException (f"cannot resolve var { var_sym } " , form = form )
3198
3202
3199
3203
return VarRef (
3200
- form = var_sym ,
3204
+ form = form ,
3201
3205
var = var ,
3202
3206
return_var = True ,
3203
3207
env = ctx .get_node_env (pos = ctx .syntax_position ),
Original file line number Diff line number Diff line change 21
21
from basilisp .lang import set as lset
22
22
from basilisp .lang import symbol as sym
23
23
from basilisp .lang import vector as vec
24
- from basilisp .lang .interfaces import IPersistentMap , IPersistentSet , IPersistentVector
24
+ from basilisp .lang .interfaces import (
25
+ IPersistentMap ,
26
+ IPersistentSet ,
27
+ IPersistentVector ,
28
+ ISeq ,
29
+ )
25
30
from basilisp .lang .runtime import Namespace , Var , to_lisp
26
31
from basilisp .lang .typing import LispForm
27
32
from basilisp .lang .typing import ReaderForm as ReaderLispForm
@@ -901,8 +906,8 @@ class Try(Node[SpecialForm]):
901
906
902
907
903
908
@attr .frozen
904
- class VarRef (Node [sym .Symbol ], Assignable ):
905
- form : sym .Symbol
909
+ class VarRef (Node [Union [ sym .Symbol , ISeq ] ], Assignable ):
910
+ form : Union [ sym .Symbol , ISeq ]
906
911
var : Var
907
912
env : NodeEnv
908
913
return_var : bool = False
You can’t perform that action at this time.
0 commit comments