Conflicting tests #306
-
Hi @wlav, I am trying to understand the following 2 tests: In the case of Why is it the case that in one instance we expect it to work, but not in the other? Or am I missing something else? ping @aaronj0 @vgvassilev |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This is exploiting subtleties of the dictionary mechanism as a heuristic to decide whether a class is missing by mistake or intentionally not defined. There's nothing at all in the dictionary about
that use that type, so it not being defined, was most likely intentional. Opaque handles are common on Windows. |
Beta Was this translation helpful? Give feedback.
-
Is that the equivalent of incomplete class? |
Beta Was this translation helpful? Give feedback.
-
Don't think so. Here's the code:
So 2 pieces to it. 1) Cling's class info is checked for having a definition; it does not check whether said definition is complete. This is the bit that basically says "was the class recorded in some dictionary somewhere." And 2) if it's not, a forward declaration is checked the hard way. For subsequent calls into meta, there are various actual checks for |
Beta Was this translation helpful? Give feedback.
This is exploiting subtleties of the dictionary mechanism as a heuristic to decide whether a class is missing by mistake or intentionally not defined. There's nothing at all in the dictionary about
no_such_class
, so the assumption is that it was accidentally pulled in from some header somewhere, whereas forOpaqueType
, the dictionary has added explicit methods:that use that type, so it not being defined, was most likely intentional.
Opaque handles are common on Windows.