Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 141e7f4

Browse files
authored
Merge pull request #6282 from livecodeali/bugfix-20874
[[ Bug 20874 ]] Fix incorrect private imports from assembly support module
2 parents e4aef70 + ed90e9a commit 141e7f4

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

docs/lcb/notes/20874.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# LiveCode Builder Tools
2+
## lc-compile
3+
4+
# [20874] Take access type into account when importing assembly support module definitions
5+

toolchain/lc-compile/src/bind.g

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -136,29 +136,29 @@
136136
'rule' DeclareImportedDefinitions(Module, unsafe(_, Definition)):
137137
DeclareImportedDefinitions(Module, Definition)
138138

139-
'rule' DeclareImportedDefinitions(Module, type(Position, _, Name, _)):
140-
DeclareImportedId(Module, Name)
139+
'rule' DeclareImportedDefinitions(Module, type(Position, Access, Name, _)):
140+
DeclareImportedId(Module, Access, Name)
141141

142-
'rule' DeclareImportedDefinitions(Module, constant(Position, _, Name, _)):
143-
DeclareImportedId(Module, Name)
142+
'rule' DeclareImportedDefinitions(Module, constant(Position, Access, Name, _)):
143+
DeclareImportedId(Module, Access, Name)
144144

145-
'rule' DeclareImportedDefinitions(Module, variable(Position, _, Name, _)):
146-
DeclareImportedId(Module, Name)
145+
'rule' DeclareImportedDefinitions(Module, variable(Position, Access, Name, _)):
146+
DeclareImportedId(Module, Access, Name)
147147

148-
'rule' DeclareImportedDefinitions(Module, handler(Position, _, Name, _, _, _)):
149-
DeclareImportedId(Module, Name)
148+
'rule' DeclareImportedDefinitions(Module, handler(Position, Access, Name, _, _, _)):
149+
DeclareImportedId(Module, Access, Name)
150150

151-
'rule' DeclareImportedDefinitions(Module, foreignhandler(Position, _, Name, _, _)):
152-
DeclareImportedId(Module, Name)
151+
'rule' DeclareImportedDefinitions(Module, foreignhandler(Position, Access, Name, _, _)):
152+
DeclareImportedId(Module, Access, Name)
153153

154-
'rule' DeclareImportedDefinitions(Module, property(Position, _, Name, _, _)):
155-
DeclareImportedId(Module, Name)
154+
'rule' DeclareImportedDefinitions(Module, property(Position, Access, Name, _, _)):
155+
DeclareImportedId(Module, Access, Name)
156156

157-
'rule' DeclareImportedDefinitions(Module, event(Position, _, Name, _)):
158-
DeclareImportedId(Module, Name)
157+
'rule' DeclareImportedDefinitions(Module, event(Position, Access, Name, _)):
158+
DeclareImportedId(Module, Access, Name)
159159

160-
'rule' DeclareImportedDefinitions(Module, syntax(Position, _, Name, _, _, _, _)):
161-
DeclareImportedId(Module, Name)
160+
'rule' DeclareImportedDefinitions(Module, syntax(Position, Access, Name, _, _, _, _)):
161+
DeclareImportedId(Module, Access, Name)
162162

163163
'rule' DeclareImportedDefinitions(Module, metadata(_, _, _)):
164164
-- do nothing
@@ -631,12 +631,15 @@
631631

632632
'condition' ResolveNamespace(OPTIONALID -> NAME)
633633

634-
'action' DeclareImportedId(ID, ID)
634+
'action' DeclareImportedId(ID, ACCESS, ID)
635635

636-
'rule' DeclareImportedId(Namespace, Id):
636+
'rule' DeclareImportedId(Namespace, public, Id):
637637
Id'Namespace <- id(Namespace)
638638
DeclareNamespacedId(Id)
639639
640+
'rule' DeclareImportedId(Namespace, Access, Id):
641+
-- don't import non-public ids
642+
640643
-- Ensure all module-level declarations have module namespace
641644
'action' DeclareId(ID)
642645

0 commit comments

Comments
 (0)