Found by the ILCompiles property sweep during /verify-implementation plan-0ca7b7 (seed 5F-Ai3FcPnEx, -e CsCheck_Seed=5F-Ai3FcPnEx). Pre-existing: identical at BASE acd1d40 and at 61bf20f (built sharpyc, run).
| program body |
sharpy |
python3 |
x = None.qux |
SPY0908 CS0023 "Operator '.' cannot be applied to operand of type ''" |
AttributeError: 'NoneType' object has no attribute 'qux' |
print(None.qux) |
SPY0908 CS0023 |
AttributeError |
y: int = None.real |
SPY0908 CS0023 |
AttributeError |
raise None.qux (the seed, inside def transform(foo: int) -> float) |
SPY0908 CS0023 |
AttributeError |
raise None (control) |
SPY0242, refused correctly |
TypeError |
The type checker resolves a member access whose receiver is the None literal without refusing it. The name doesn't exist on None's type, so it should be SPY0203 (no member) at semantic time, the way any other receiver with no such member is refused. Meta-class: SPY0908 as a net (docs/design/spy0908-policy.md). Standing harness: ILCompilesPropertyTests; add a None receiver cell to the member-access matrix.
Found by the ILCompiles property sweep during /verify-implementation plan-0ca7b7 (seed
5F-Ai3FcPnEx,-e CsCheck_Seed=5F-Ai3FcPnEx). Pre-existing: identical at BASE acd1d40 and at 61bf20f (built sharpyc,run).x = None.quxprint(None.qux)y: int = None.realraise None.qux(the seed, insidedef transform(foo: int) -> float)raise None(control)The type checker resolves a member access whose receiver is the
Noneliteral without refusing it. The name doesn't exist onNone's type, so it should be SPY0203 (no member) at semantic time, the way any other receiver with no such member is refused. Meta-class: SPY0908 as a net (docs/design/spy0908-policy.md). Standing harness: ILCompilesPropertyTests; add aNonereceiver cell to the member-access matrix.