Skip to content

[TM-298] Fix lookup of ctor with named field

Konstantin Ivanov requested to merge martoon/tm298-constructor-with-named into master

Description

Problem: when constructor has exectly one field of type :!, CanGoDeeper thinks it should be generically traversed and fails (because there is no instance Generic (:!), and not sure we'd like to define one just for purpose of our lookup).

Solution: halt traversal at :!, because it always corresponds to field.

Related issue(s)

https://issues.serokell.io/issue/TM-298

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Merge request reports