question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Satisfies Callable" compile error when class MyClass() satisfies MyInterface()

See original GitHub issue

The 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:open
  • Created 8 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
quintessecommented, Jul 26, 2016

@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.

0reactions
quintessecommented, Jul 26, 2016

Moving to 1.3

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found