stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.34k stars 224 forks source link

Check for property via selector before using value(forKey:) #234

Closed ilyapuchka closed 6 years ago

ilyapuchka commented 6 years ago

Resolves #231

djbe commented 6 years ago

Ideally we'd be able to log some sort of warning instead of silently continuing. More often than not, I prefer the compiler/runtime to tell me if I did something wrong instead of just doing it's own thing.

What's the general consensus on this? Error out (current behaviour), or silently continue? @AliSoftware @kylef @yonaskolb

ilyapuchka commented 6 years ago

This is consistent with current behavior for undefined properties. If we want to revisit it, which I agree we, I think better to do it separately.

mbrandonw commented 6 years ago

Thanks for taking care of that so quickly @ilyapuchka!