mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-12 04:09:34 +00:00
15 lines
655 B
Nim
15 lines
655 B
Nim
discard """
|
|
output: '''size 64 64'''
|
|
"""
|
|
|
|
# Regression test for TRANSITIVE generic-instance offers. `fromRaw[int]` is first
|
|
# instantiated in mtscopewarm (a clean scope where `TScopeSize` is unambiguously
|
|
# 65). The consumer here also imports mtscopeb (`TScopeSize` = 33), so a fresh
|
|
# re-instantiation of fromRaw's body would resolve `TScopeSize` ambiguously. The
|
|
# clean instance reaches here only TRANSITIVELY (via mtscopemid), so the offer
|
|
# rebuild must walk the whole import closure, not just direct imports. Mirrors
|
|
# nimbus-eth2 `keys.fromRaw` -> `SkRawPublicKeySize` (secp vs secp256k1).
|
|
import mtscopegen, mtscopeb, mtscopemid
|
|
|
|
echo fromRaw(64)
|