Can't derive a type that involves a hierarchy of traits + scalajs
See original GitHub issueIssue Description
Input
class Field {}
class Abc {
def p: (Field, Map[String, String]) = (null, null)
}
Output
[error] Couldn't derive type uni.Abc
[error] read[uni.Abc]("")
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Can't derive a type that involves a hierarchy of traits + scalajs
Here is a complete test project. Strangely, the jvm sub project can be made to work by changing the scala-js version to 0.6.3...
Read more >scalalandio/chimney - Gitter
@krzemin Let's say I have two sealed trait hierarchies A and B . When I want to go ... Chimney can't derive transformation...
Read more >Defining a non-native JS type - Scala.js
Non-native JS traits cannot declare concrete term members (i.e., they must all be abstract) unless their right-hand-side is exactly = js.undefined .
Read more >Scala: Building a complex hierarchy of traits and classes
My current implementation for StateSite does not have type parameters; it is a standard hierarchy of traits, terminating in classes that have a ......
Read more >µPickle 2.0.0
For ScalaJS applications, use this dependencies instead: ... just use type of the sealed trait read[IntOrTuple]("""{"$type":"upickle.example.Sealed.
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
This runs ok from the REPL in Ammonite:
but fails to compile when used inside an Ammonite script:
Should I open another bug issue?
Solved by making
Datos
a top level class, instead of nested inside a function.