mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- 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.
35 lines
546 B
Plaintext
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);
|
|
} |