Unable to create value classes
See original GitHub issueI ran into the following issue while creating a value class in an almond-based Juptyer notebook:
class Kelvin(val t: Double) extends AnyVal
cmd0.sc:7: not found: value res0
.declareVariable("res0", res0); Iterator() },
^cmd0.sc:1: value class may not be a member of another class
class Kelvin(val t: Double) extends AnyVal
^Compilation Failed
Compilation Failed
I can reproduce the error via the “Try it online” button on https://almond.sh/ for Scala 2.11, 2.12 and 2.13 (although the error message is less verbose in 2.11). I assume, almond silently injects another base class which is not allow for the value class. Is there a way to solve this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
PowerShell classes still can't create value types · Issue #10669
PowerShell classes still can't create value types #10669 ... I should be able to write IEquatable<T> and IComparable<T> classes ...
Read more >Unable to instantiate class with value class parameter from Java
The output when building with gradle shows that Java can't acces the constructor of DomainObject : ❯❯❯ ./gradlew run > Task :compileJava FAILED...
Read more >can't set a value in another class [closed] - Stack Overflow
This is a method from a class, courses is an array from another class, I set the value of cn in main, but...
Read more >010426: Failed to create feature class <value>.—ArcGIS Pro
Solution. Check to see if a feature class with the same name already exists at the specified output location. Either try a different...
Read more >this - JavaScript | MDN
Class constructors are always called with new , so their behavior is the same as function constructors: the this value is the new...
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 Free
Top 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
@Quafadas @sauerburger The upcoming version
0.11.2
should fix the error in 2.12 and 2.13 in the binder demo, or when the variable inspector is enabled, thanks to https://github.com/almond-sh/almond/pull/793.Oh - cool, thanks!