Files
c3c/test/test_suite/define/weak_alias_fails.c3
Christoffer Lerno 5c77c9a754 - Change distinct -> typedef.
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00

35 lines
546 B
Plaintext

module std::math::vector;
alias Vec2f = float[<2>];
module abc;
import std::math;
alias Vec2f @weak = std::math::vector::Vec2f;
fn Vec2f foo(Vec2f a) { return a * 2; }
module gog;
import std::math;
alias Vec2f = std::math::vector::Vec2f;
module deef;
import gog;
alias Vec2f @weak = gog::Vec2f;
fn Vec2f foo(Vec2f a) { return a * 2; }
module test;
import abc;
import std::math;
fn void test()
{
Vec2f a;
abc::foo(a);
}
module test2;
import abc;
import deef;
fn void test2()
{
Vec2f a; // #error: abc::Vec2f or deef::Vec2f
abc::foo(a);
}