Skip to content

Instantly share code, notes, and snippets.

@Lucretia
Created December 28, 2023 15:55
Show Gist options
  • Save Lucretia/9c9856a29b6f1f74dec4712c48da1e88 to your computer and use it in GitHub Desktop.
Save Lucretia/9c9856a29b6f1f74dec4712c48da1e88 to your computer and use it in GitHub Desktop.
[Ada] sdl-audio-sample_formats.ads
sdl-audio-sample_formats.ads:100:50: error: non-static constant in preelaborated unit
sdl-audio-sample_formats.ads:100:50: error: static expression must have scalar or string type (RM 4.9(2))
sdl-audio-sample_formats.ads:101:50: error: non-static constant in preelaborated unit
sdl-audio-sample_formats.ads:101:50: error: static expression must have scalar or string type (RM 4.9(2))
sdl-audio-sample_formats.ads:119:50: error: non-static constant in preelaborated unit
sdl-audio-sample_formats.ads:119:50: error: static expression must have scalar or string type (RM 4.9(2))
@Lucretia
Copy link
Author

Changing the first one to a deferred constant gives this:

sdl-audio-sample_formats.ads:97:50: error: deferred constant is frozen before completion
sdl-audio-sample_formats.ads:98:50: error: non-static constant in preelaborated unit
sdl-audio-sample_formats.ads:98:50: error: static expression must have scalar or string type (RM 4.9(2))
sdl-audio-sample_formats.ads:116:50: error: non-static constant in preelaborated unit
sdl-audio-sample_formats.ads:116:50: error: static expression must have scalar or string type (RM 4.9(2))
sdl-audio-sample_formats.ads:160:04: error: full constant declaration appears too late
gprbuild: *** compilation phase failed
make: *** [makefile:48: lib/libadasdl.a] Error 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment