221-fix-classes-without-__init__-should-be-valid #304
|
@ -371,7 +371,7 @@ impl Nac3 {
|
||||||
});
|
});
|
||||||
|
|
||||||
let (name, def_id, ty) = composer
|
let (name, def_id, ty) = composer
|
||||||
.register_top_level(stmt.clone(), Some(resolver.clone()), path.clone())
|
.register_top_level(stmt.clone(), Some(resolver.clone()), path.clone(), false)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
CompileError::new_err(format!(
|
CompileError::new_err(format!(
|
||||||
"compilation failed\n----------\n{}",
|
"compilation failed\n----------\n{}",
|
||||||
|
@ -451,7 +451,7 @@ impl Nac3 {
|
||||||
});
|
});
|
||||||
let resolver = Arc::new(Resolver(inner_resolver.clone())) as Arc<dyn SymbolResolver + Send + Sync>;
|
let resolver = Arc::new(Resolver(inner_resolver.clone())) as Arc<dyn SymbolResolver + Send + Sync>;
|
||||||
let (_, def_id, _) = composer
|
let (_, def_id, _) = composer
|
||||||
.register_top_level(synthesized.pop().unwrap(), Some(resolver.clone()), "".into())
|
.register_top_level(synthesized.pop().unwrap(), Some(resolver.clone()), "".into(), false)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let fun_signature =
|
let fun_signature =
|
||||||
|
|
|
@ -208,7 +208,7 @@ fn main() {
|
||||||
if module == &Some("__future__".into()) && names.len() == 1 && names[0].name == "annotations".into() => (),
|
if module == &Some("__future__".into()) && names.len() == 1 && names[0].name == "annotations".into() => (),
|
||||||
_ => {
|
_ => {
|
||||||
let (name, def_id, ty) =
|
let (name, def_id, ty) =
|
||||||
composer.register_top_level(stmt, Some(resolver.clone()), "__main__".into()).unwrap();
|
composer.register_top_level(stmt, Some(resolver.clone()), "__main__".into(), true).unwrap();
|
||||||
internal_resolver.add_id_def(name, def_id);
|
internal_resolver.add_id_def(name, def_id);
|
||||||
if let Some(ty) = ty {
|
if let Some(ty) = ty {
|
||||||
internal_resolver.add_id_type(name, ty);
|
internal_resolver.add_id_type(name, ty);
|
||||||
|
|
Loading…
Reference in New Issue