cannot instantiate Contextual.Using in a subclass
See original GitHub issueAs reported by @LisiLisenok, this code does not compile:
class MyContextual<Element>(Element init)
extends Contextual<Element>() {
shared void f() {
try(Using(init)){}
}
}
A workaround is to write try(super.Using(init)){}
.
If I copy/paste Contextual
into my own project, the code is accepted. I therefore suspect that the bug must be in the model loader.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Can't instantiate subclass of NSManagedObject - Stack Overflow
To use a Swift subclass of the NSManagedObject class with your Core Data model, prefix the class name in the Class field in...
Read more >Issue with Instantiation of a Class in Workflow - SAP Community
I created a subclass of CL_HRASR00_WF_PROCESS_OBJECT to include some of my custom methods to be used in the workflow.
Read more >Chapter 8. Classes - Oracle Help Center
1.1) and must be declared abstract if it is incompletely implemented; such a class cannot be instantiated, but can be extended by subclasses....
Read more >What is Context in Android? - GeeksforGeeks
It allows us to interact with other Android components by sending messages. It gives you information about your app environment. The code has ......
Read more >10.4 Abstract Classes and Methods - Programming - InformIT
These classes cannot be used to instantiate objects, because, as we'll soon see, abstract classes are incomplete. Subclasses must declare ...
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
It’s OK I have a fix now that I understand what’s supposed to happen.
Done.