← 输入框|github.com|刷新
Skip to content

import as does not work #2153

Closed
Closed

Description

@Smit-create
% cat a.py 
from lpython import i32

def f(x: i32) -> i32:
    return 2 *x
% cat b.py
from lpython import f64
from a import f as fa

def main0():
    print(fa(3))

main0()

Error:

% lpython b.py -I .
semantic error: Function 'fa' is not declared and not intrinsic
 --> b.py:5:11
  |
5 |     print(fa(3))
  |           ^^^^^ 

CPython:

% PYTHONPATH=$PWD/src/runtime/lpython python b.py 
6

Activity

  1. changed the title [-]`import` `as` does work[/-] [+]`import` `as` does not work[/+] on Jul 13, 2023
  2. self-assigned this
    on Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions