Skip to content

Instantly share code, notes, and snippets.

@mooskagh

mooskagh/x.nim Secret

Last active May 20, 2018 14:40
Show Gist options
  • Save mooskagh/e112a05a1fc37c67753a219edb4833d1 to your computer and use it in GitHub Desktop.
Save mooskagh/e112a05a1fc37c67753a219edb4833d1 to your computer and use it in GitHub Desktop.
type
DashboardSection = ref object of RootObj
discard
GlobalSection = ref object of DashboardSection
discard
Dashboard = ref object
global: GlobalSection
method Update(section: DashboardSection) {. base .} =
discard
proc Blah(dashboard: Dashboard) =
dashboard.global.Update()
# Run:
# nim check --verbosity:2 x.nim
# Warning:
# x.nim(16, 19) Warning: not GC-safe: 'Update(dashboard.global())' [GcUnsafe]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment