You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isuckatcs opened this issue
Dec 24, 2023
· 0 comments
Labels
bugSomething isn't workingcrashmojoIssues that are related to mojomojo-langTag for all issues related to language.mojo-repoTag all issues with this label
error: unable to locate module 'foo'
from collections.foo import bar
^
@"$collections"::@"$vector"::@DynamicVector
mojo: /__w/modular/modular/KGEN/lib/MojoParser/DeclResolver.cpp:679: M::KGEN::LIT::ASTDecl &M::KGEN::LIT::DeclResolver::getDeclForTypeSymbol(mlir::SymbolRefAttr) const: Assertion `it != declForTypeSymbol.end() && "Unknown decl symbol!"' failed.
Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
Stack dump:
0. Program arguments: mojo repro.mojo
1. Crash resolving decl body at loc(".../repro.mojo":4:1)
>> fn main() raises:
^................
>> with open("/dev/stdin", "r") as stdin:
.........................................<
2. Crash parsing statement at loc(".../repro.mojo":5:5)
>> with open("/dev/stdin", "r") as stdin:
^....................................<
If the with statement is not present, the crash does not occur.
fromcollections.fooimportbarfnmain() raises:
# with open("/dev/stdin", "r") as stdin:pass
error: unable to locate module 'foo'
from collections.foo import bar
^
mojo: error: failed to parse the provided Mojo
bugSomething isn't workingcrashmojoIssues that are related to mojomojo-langTag for all issues related to language.mojo-repoTag all issues with this label
Bug description
If the
with
statement is not present, the crash does not occur.Steps to reproduce
System information
The text was updated successfully, but these errors were encountered: