You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Hendrik Gärtner (JIRA)" <ji...@apache.org> on 2019/05/21 09:28:00 UTC
[jira] [Created] (TOREE-501) Function type conversion error - but
the code seems work
Hendrik Gärtner created TOREE-501:
-------------------------------------
Summary: Function type conversion error - but the code seems work
Key: TOREE-501
URL: https://issues.apache.org/jira/browse/TOREE-501
Project: TOREE
Issue Type: Bug
Components: Kernel
Affects Versions: 0.3.0
Environment: Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
[GCC 7.2.0], notebook server: 5.4.0 Apache Toree 0.3.0
Reporter: Hendrik Gärtner
Dear Toree Developers,
the following function definition results in a confusing type error:
def appmodel[C,D] (testdata: Seq[Map[String,Any]], idKey:String) (m:(Map[String,Any],String) => (D,C)):Seq[(D,C)] = {
testdata.map (m(_,idKey))
}
The code seems to work but sometimes the following error appears after execution:
<console>:146: error: missing argument list for method appmodel Unapplied methods are only converted to functions when a function type is expected. You can make this conversion explicit by writing `appmodel _` or `appmodel(_,_)(_)` instead of `appmodel`. appmodel ^
With best wishes & thanks for your great efforts on Toree
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)