You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/10/02 12:27:26 UTC

[jira] [Commented] (FLINK-2806) No TypeInfo for Scala's Nothing type

    [ https://issues.apache.org/jira/browse/FLINK-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940999#comment-14940999 ] 

ASF GitHub Bot commented on FLINK-2806:
---------------------------------------

GitHub user ggevay opened a pull request:

    https://github.com/apache/flink/pull/1212

    [FLINK-2806] [scala-api] Add a TypeInformation[Nothing].

    I added a TypeInfo[Nothing] class, and added a line to workaround the compiler bug. I also added a test for this, which tests at compile time: if the "implicit val scalaNothingTypeInfo" is not there, then it does not compile.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ggevay/flink typeInfo-nothing

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1212.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1212
    
----
commit a73a96a5de5a271ed4a3ca55aea14c34072aa7e7
Author: Gabor Gevay <gg...@gmail.com>
Date:   2015-10-02T08:14:01Z

    [FLINK-2806] [scala-api] Add a TypeInformation[Nothing].

----


> No TypeInfo for Scala's Nothing type
> ------------------------------------
>
>                 Key: FLINK-2806
>                 URL: https://issues.apache.org/jira/browse/FLINK-2806
>             Project: Flink
>          Issue Type: Bug
>          Components: Scala API
>            Reporter: Gabor Gevay
>            Assignee: Gabor Gevay
>            Priority: Minor
>
> When writing some generic code, I encountered a situation where I needed a TypeInformation[Nothing]. Two problems prevent me from getting it:
> 1. TypeInformationGen.mkTypeInfo doesn't return a real TypeInformation[Nothing]. (It actually returns a casted null in that case.)
> 2. The line
> implicit def createTypeInformation[T]: TypeInformation[T] = macro TypeUtils.createTypeInfo[T]
> does not fire in some situations when it should, when T = Nothing. (I guess this is a compiler bug.)
> I will open a PR shortly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)