You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiler: Don't emit interface purity/visibility errors if the types don't match
For example, `public` or `protected` function visibility doesn't make
much sense in a property context (expects `in`, `out`, `in-out`). In
this case, we emit the full type that the interface expects so that the
user can get it right in one iteration.
Copy file name to clipboardExpand all lines: internal/compiler/tests/syntax/interfaces/implement_child.slint
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ component CrossKindImpl {
122
122
123
123
exportcomponentChildCrossKind {
124
124
implement ValidInterface <=> impl;
125
-
// > <error{Cannot implement 'ValidInterface' based on 'impl'.↵- 'impl.reset' must be a 'function() -> void' (found a 'int' property)↵- 'impl.reset' must be 'public' (found 'in-out')↵- 'impl.reset' must be 'pure'↵- 'impl.speak' must be a 'callback() -> void' (found a 'int' property)↵- 'impl.value' must be a 'int' property (found a 'callback() -> void')}
125
+
// > <error{Cannot implement 'ValidInterface' based on 'impl'.↵- 'impl.reset' must be a 'public pure function() -> void' (found a 'int' property)↵- 'impl.speak' must be a 'callback() -> void' (found a 'int' property)↵- 'impl.value' must be an in-out 'int' property (found a 'callback() -> void')}
0 commit comments