2020-12-30 15:35:49 +08:00
|
|
|
Errors:
|
|
|
|
- Not supported
|
|
|
|
- Only * is supported
|
|
|
|
- Expected * in *, but got *
|
|
|
|
- Divergent type in (construct), (location 1), (location 2)
|
|
|
|
- Unknown field
|
|
|
|
- Unbounded variable
|
|
|
|
- Different variable
|
|
|
|
- Different domain
|
|
|
|
- * is not subclass of *
|
|
|
|
- Type not equal
|
|
|
|
- Incorrect number of parameters
|
|
|
|
|
|
|
|
GlobalContext:
|
|
|
|
- Separate from typedefs
|
2020-12-30 16:03:09 +08:00
|
|
|
- Interact with python intepreter to get data
|
2020-12-30 15:35:49 +08:00
|
|
|
- Primitive Type Instance List
|
|
|
|
- Symbol Table (readable, ever defined)
|
|
|
|
- TypeVar definition stack
|
|
|
|
- Provide subst, inv_subst, blablabla
|
|
|
|
- Cache type var method lookup (dropped when related assumptions are changed)
|
2020-12-30 16:29:21 +08:00
|
|
|
- Responsible for printing the error (lookup module/type info, handle line number offset)
|
|
|
|
|
|
|
|
Name Resolution:
|
|
|
|
- Get class/methods, track module via `inspect.getmodule`
|
|
|
|
- GlobalContext store function/class - module association, perform name
|
|
|
|
resolution in the module when identifier is unbounded, and check its type
|
2020-12-30 15:35:49 +08:00
|
|
|
|