Re:Swift: When Unused Code Is a Bug
by joeblau on Sunday August 05, 2018 @11:33AM
(#17691812)
I don't think there is. I think the code is functioning as expected — it's just written in a super confusing way. What should probably happen is that the compiler should throw an error about redefining a function in a super classes extension. I'm not a compiler engineer but a check for that seems like it would be intensive unless that information is codified in the AST somehow.
[ Parent
| on HN ]
Re:Swift: When Unused Code Is a Bug
by slavapestov on Tuesday August 07, 2018 @05:26AM
(#17704966)
It's a bug - https://bugs.swift.org/browse/SR-103
Re:Swift: When Unused Code Is a Bug
by anon180719 on Sunday August 05, 2018 @12:54PM
(#17692169)
hmph. I agree, the compiler should probably not let you compile in that case. Funny enough this reminds me of "responder chain politics" in dynamically typed languages with duck typing.