Skip to content

ASR: [BUG] Error while using dot to access module variable #1242

Closed
@Smit-create

Description

@Smit-create
% cat a.py
import math

def f():
    print(math.pi, math.e)

f()

LPython Output:

% lpython a.py 
semantic error: Only Variable type is supported for now in Attribute
 --> a.py:4:11
  |
4 |     print(math.pi, math.e)
  |           ^^^^^^^ 

CPython:

% python a.py 
3.141592653589793 2.718281828459045

Metadata

Metadata

Labels

asrASR related changesbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions