"Satisfies Callable" compile error when class MyClass() satisfies MyInterface()
See original GitHub issueThe compile error when putting parentheses next to a satisfied interface is a class declaration should be improved, as this could be misleading/confusing for beginners trying Ceylon. Namely, the compiler error should be changed to be more descriptive.
This happens with both the JVM and JavaScript compilers:
interface MyInterface {}
class MyClass() satisfies MyInterface() {}
The compile error is:
satisfies ‘Callable’
The compile error should be something along the lines of:
“a satisfied interface in a class declaration cannot have an initializer parameter list”
Although I’m sure somebody can come up with a more descriptive compile error than the above.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Regression: 2.4.1 Generic type mismatch · Issue #16985
It compiles fine in 2.3.4 & 2.4.0, but produces a not assignable error in 2.4.1 and nightly. ... interface MyInterface { something: number;...
Read more >Callable class giving error: doPing is not abstract and does ...
In your code, the call method has an argument: it does not override the call method of the Callable interface - It should...
Read more >TypeScript Cheatsheet, Common Errors, and More
It will call .toString() automatically on any index you pass! However, in some environments, this still might not satisfy TS.
Read more >Java - Coding Rules
class Foo { public int myField; public void doSomething() { int myField = 0; . ... rather than validated by the Java compiler,...
Read more >Kotlin Language Documentation 1.7.21
Explicitly specify binaries.executable() in the build script ... The Kotlin compiler detects these remaining errors, ... class MyClass {.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gavinking this issue was for a better error message until you have time to implement the feature. Is that something you want to do? If so, is it for 1.2.3 or 1.3? And if not you should probably close it.
Moving to 1.3