feat(frontends/lean/elaborator): structure notation: allow explicit ctor param when given expected type
This commit is contained in:
parent
da785d96a0
commit
3aa5ebb8bd
1 changed files with 1 additions and 1 deletions
|
|
@ -2920,7 +2920,7 @@ expr elaborator::visit_structure_instance(expr const & e, optional<expr> const &
|
|||
expr c_arg;
|
||||
expr d = binding_domain(c_type);
|
||||
if (i < nparams) {
|
||||
if (is_explicit(binding_info(c_type))) {
|
||||
if (is_explicit(binding_info(c_type)) && !expected_type) {
|
||||
report_or_throw(elaborator_exception(e, sstream() << "invalid structure value {...}, structure parameter '" <<
|
||||
binding_name(c_type)
|
||||
<< "' is explicit in the structure constructor '" <<
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue