Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
f29e38a5
Commit
f29e38a5
authored
Oct 14, 2013
by
John van Groningen
Browse files
check the type of instances defined using :== (maybe the parser should reject these instances)
parent
265f1eab
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/transform.icl
View file @
f29e38a5
...
...
@@ -1392,6 +1392,11 @@ where
remove_macros_from_group
[
FunctionOrIclMacroIndex
fun
:
funs
]
fun_defs
#
(
funs
,
fun_defs
)=
remove_macros_from_group
funs
fun_defs
|
fun_defs
.[
fun
].
fun_info
.
fi_group_index
<
NoIndex
/* Macros don't have types, however the parser allows :== for instances, which results in a macro with a type.
These types must be checked, because if the type of the expression is incorrect and the instance is exported,
an incorrectly typed program can be compiled. Currently using :== in instances probably has no effect,
so it might be better to reject this in the parser. */
&&
case
fun_defs
.[
fun
].
fun_type
of
No
->
True
;
_
->
False
=
(
funs
,
fun_defs
)
=
([
fun
:
funs
],
fun_defs
)
remove_macros_from_group
[
DclMacroIndex
macro_module_index
macro_index
:
funs
]
fun_defs
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment