Python: Don't pass synthetic class instance to __new__ on class calls

This commit is contained in:
Rasmus Wriedt Larsen
2022-10-05 16:56:19 +02:00
parent 9949824810
commit 5e5bab5a7c
3 changed files with 13 additions and 10 deletions

View File

@@ -232,7 +232,7 @@ class Customized:
customized = Customized()
SINK(Customized.a) #$ MISSING:flow="SOURCE, l:-8 -> customized.a"
SINK_F(Customized.b)
SINK(customized.a) #$ flow="SOURCE, l:-10 -> customized.a"
SINK(customized.a) #$ MISSING: flow="SOURCE, l:-10 -> customized.a"
SINK(customized.b) #$ flow="SOURCE, l:-7 -> customized.b"

View File

@@ -405,11 +405,11 @@ def test__new__():
# well.
SINK(NewTest.foo) # $ MISSING: flow="SOURCE, l:-10 -> NewTest.foo"
SINK(nt.foo) # $ flow="SOURCE, l:-11 -> nt.foo"
SINK(nt.foo) # $ MISSING: flow="SOURCE, l:-11 -> nt.foo"
NewTest.foo = NONSOURCE
SINK_F(NewTest.foo)
SINK_F(nt.foo) # $ SPURIOUS: flow="SOURCE, l:-15 -> nt.foo"
SINK_F(nt.foo)
# ------------------------------------------------------------------------------
# Global scope