Giter Club home page Giter Club logo

scala-2-13-scalap-primitive-parameter-detection's Introduction

scalap 2.13.[0|1] issue with constructor parameters

This repo demonstrates an issue with scalap in Scala 2.13.0 and 2.13.1 whereby it does not report constructor parameters in the same way as Scala <2.12.

To show this, run the following two commands:

$ sbt "++2.12.9 run"
[info] Loading project definition from ...
[info] Loading settings for project scala-2-13-scalap-primitive-parameter-detection from build.sbt ...
[info] Set current project to scala-2-13-scalap-primitive-parameter-detection (in build ...)
[info] Setting Scala version to 2.12.9 on 1 projects.
[info] Reapplying settings...
[info] Set current project to scala-2-13-scalap-primitive-parameter-detection (in build ...)
[info] running code.Test
 - <init>: List(MethodSymbol(base, owner=2, flags=2000, info=15 ,None))
 - <init>: List(MethodSymbol(base, owner=2, flags=2000, info=15 ,None))
 - <init>: List(MethodSymbol(base, owner=2, flags=2000, info=15 ,None))
[success] Total time: 1 s, completed Sep 22, 2019, 10:06:52 PM
$ sbt "++2.13.1 run"
[info] Loading project definition from ...
[info] Loading settings for project scala-2-13-scalap-primitive-parameter-detection from build.sbt ...
[info] Set current project to scala-2-13-scalap-primitive-parameter-detection (in build ...)
[info] Setting Scala version to 2.13.1 on 1 projects.
[info] Reapplying settings...
[info] Set current project to scala-2-13-scalap-primitive-parameter-detection (in build ...)
[info] running code.Test
 - <init>: List()
 - <init>: List()
 - <init>: List()
[success] Total time: 1 s, completed Sep 22, 2019, 10:07:31 PM

In 2.12.9, the MethodSignature object for the constructor has one entry for children, the single constructor parameter. In 2.13.1, the object has no children at all, making it impossible to explore the constructor’s parameters.

Context

This was discovered while trying to make the tests for [lift-json](https://github.com/lift/framework/tree/master/core/json) run successfully for Scala 2.13.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.