slint/internal/compiler/tests/syntax
Olivier Goffart d8d0bb2115 Rework lookup of sub-elements with regard to special accepted elements
Consider
```slint
// Some code in the wild actually have made their own menubar before
component MenuBar { /* ... */ }

component Row { /* ... */ }

export component Main inherits Window {
  // This should find the declared component and not the builtin component
  MenuBar { }

  GridLayout {
     Row {}
  }
}
```

Previously, `MenuBar` and `Row` were first resolved against
`additional_accepted_child_types` and so it would always find the
builtin one.
But this patch changes that to find the builtin one only if it hasn't
been replaced by another component with the name name.
(So we'd use the cusom MenuBar and the custom Row)

Another change is that we also lookup the
additional_accepted_child_types if they are in a @children.

```slint
component MyGrid {
   GridLayout { @children }
}
export component Main {
   MyGrid {
      // This used to be an error but is now accepted
      Row { }
   }
}
```
2025-01-23 14:28:11 +01:00
..
accessibility Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
analysis Detect binding loops when it involve the condition of a if in a layout 2025-01-13 14:40:18 +01:00
basic Parser: skip UTF-8 BOM 2025-01-07 12:34:08 +01:00
callbacks Fix error messages with invalid change callback 2024-06-28 10:45:45 +02:00
elements Rework lookup of sub-elements with regard to special accepted elements 2025-01-23 14:28:11 +01:00
exports Add export { ... } from "....slint"; syntax. (#5533) 2024-07-03 12:50:40 +02:00
expressions Fix min/max/clamp in presence of percentages 2024-12-16 18:44:55 +01:00
focus Janitor: Remove trailing whitespaces from all files 2025-01-10 13:23:22 +01:00
functions Fix warning message for a property that name is used for function 2024-12-26 17:54:38 +01:00
fuzzing Fix panic in legacy component with out property 2024-12-16 13:58:56 +01:00
imports Avid reporting further error when an element is misspelled 2024-08-29 13:10:35 +02:00
layout Compiler: Change a new error from 1.9 to a warning 2024-12-06 23:04:26 +01:00
lookup Add a warning when a component/type name overwrite another 2025-01-03 09:29:27 +01:00
new_syntax Fix panic in legacy component with out property 2024-12-16 13:58:56 +01:00
parse_error Improve a bit the error when the base of an element is missing 2025-01-06 10:47:05 +01:00