<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>292170</bug_id>
          
          <creation_ts>2012-01-22 09:20:52 +0000</creation_ts>
          <short_desc>Type collection from ternary operation broken</short_desc>
          <delta_ts>2012-01-22 10:53:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Developer tools</classification>
          <product>kdev-python</product>
          <component>general</component>
          <version>git master</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eike Hein">hein</reporter>
          <assigned_to>kdevelop-bugs-null</assigned_to>
          <cc>mail</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1217440</commentid>
    <comment_count>0</comment_count>
    <who name="Eike Hein">hein</who>
    <bug_when>2012-01-22 09:20:52 +0000</bug_when>
    <thetext>Given:

def foo(bar):
    x = 1 if bar else 2.0
    return x

... kdev-python will show the type of x as float, and accordingly the return type of foo as well. Yet it should be unsure(int, float).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217466</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Brauch">mail</who>
    <bug_when>2012-01-22 10:43:52 +0000</bug_when>
    <thetext>Git commit d3f52a0d60a39470b18caa0c2c7d8bb482fd058d by Sven Brauch.
Committed on 22/01/2012 at 11:42.
Pushed by brauch into branch &apos;master&apos;.

implement type support for ternary operators

foo = 3 if False else &quot;str&quot; # &lt;- foo:unsure(int,str)

M  +1    -0    documentation_files/builtindocumentation.py
M  +16   -0    duchain/expressionvisitor.cpp
M  +1    -0    duchain/expressionvisitor.h

http://commits.kde.org/kdev-python/d3f52a0d60a39470b18caa0c2c7d8bb482fd058d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217476</commentid>
    <comment_count>2</comment_count>
    <who name="Eike Hein">hein</who>
    <bug_when>2012-01-22 10:53:47 +0000</bug_when>
    <thetext>Thanks, fix confirmed :).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>