Open charles-cooper opened 7 months ago
slight improvement to the error message as of a8c6ea284e85348d76be91e1ac53d92180fcf7b0
vyper.exceptions.CompilerPanic: Not a type: {typ_}
contract "tmp/foo.vy:2", line 2:6
1 struct A:
---> 2 a:as_wei_value
-------------^
3 @external
This is an unhandled internal compiler error. Please create an issue on Github to notify the developers!
https://github.com/vyperlang/vyper/issues/new?template=bug.md
Got quite similar compiler panic with modules
A.vy
# pragma version 0.4.1
B.vy
# pragma version 0.4.1
import A
event E:
a: A
Console
>>> vyper B.vy
Error compiling: B.vy
vyper.exceptions.CompilerPanic: Method must be implemented by the inherited class
contract "B.vy:4", line 4:0
3
---> 4 event E:
-------^
5 a: A
This is an unhandled internal compiler error. Please create an issue on Github to notify the developers!
https://github.com/vyperlang/vyper/issues/new?template=bug.md
Version Information
vyper --version
): 0.3.9What's your issue about?
repro:
on 8ccacb3f47f864ec2ff64d5f7ca65625e9df6b2f, this produces the following error:
How can it be fixed?
the exception is valid, but the compiler should raise a good error message instead of panicking.
solution should be a single line fix: check if the return value is actually a
VyperType
before returning from_type_from_annotation