-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use scala primitives (e.g. Integer -> Int) (#271)
* use scala primitives (e.g. Integer -> Int) motivation: minify diff for flatgraph migration * fix autoconversion bug attention with autoconversions around `Option[Int]` and similar: ``` scala> Option(null: Integer) val res0: Option[Integer] = None scala> val o: Option[Int] = Option(null: Integer) val o: Option[Int] = Some(0) scala> val o: Option[Int] = Option(null: Integer).asInstanceOf[Option[Int]] val o: Option[Int] = None ``` * Properties.java -> Properties.scala to avoid java interop issues scala performs quite some magic to handle Option[Int], and the bytecode looks differently if javac or scalac compile something like `val x: Option[Int]`: ``` // scalac: public static flatgraph.SinglePropertyKey<java.lang.Object> ArgumentIndex(); //javac: public static final overflowdb.PropertyKey<scala.Int> ARGUMENT_INDEX; ``` Hence, the best way forward is to define these constants in scala.
- Loading branch information
1 parent
5c45082
commit 5042694
Showing
6 changed files
with
84 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters