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
8fcf5c33
Commit
8fcf5c33
authored
Jun 22, 2018
by
John van Groningen
Browse files
improve error message for incorrect attribute variable
parent
90173448
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/type.icl
View file @
8fcf5c33
...
...
@@ -1167,11 +1167,11 @@ freshAttribute ts=:{ts_attr_store}
,
prop_error
::
!.
Optional
.
ErrorAdmin
}
attribute_error
type_att
r
No
=
No
// XXX abort ("sanity check nr 723 failed in module type"--->("type_attr", type_attr))
attribute_error
type_att
r
(
Yes
err
)
attribute_error
attr_va
r
No
=
No
attribute_error
attr_va
r
(
Yes
err
)
#
err
=
errorHeading
"Type error"
err
=
Yes
{
err
&
ea_file
=
err
.
ea_file
<<<
"* attribute expected instead of
"
<<<
type_att
r
<<<
'\n'
}
=
Yes
{
err
&
ea_file
=
err
.
ea_file
<<<
"* attribute expected instead of
attribute variable:"
<<<
attr_va
r
<<<
'\n'
}
determine_attribute_of_cons
::
!
TypeAttribute
![
AType
]
Int
!*
AttrVarHeap
![
AttributeVar
]
![
AttrInequality
]
!*(
Optional
*
ErrorAdmin
)
->
(!
TypeAttribute
,
Int
,!*
AttrVarHeap
,![
AttributeVar
],![
AttrInequality
],!*
Optional
*
ErrorAdmin
)
...
...
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