-
-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class Main2 { | ||
static function main() { | ||
// Works fine if Test wasn't loaded | ||
// Note that types/fields declared in Test.hx will become unusable | ||
test(); | ||
} | ||
|
||
static macro function test() { | ||
haxe.macro.Context.defineModule("Test", [{ | ||
pos: (macro moduleField).pos, | ||
pack: [], | ||
name: 'moduleField', | ||
params: [], | ||
meta: [], | ||
kind: TDField(FVar(null, macro null), [AInline, AFinal]), | ||
fields: [] | ||
}]); | ||
|
||
return macro {}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
class Test {} | ||
|
||
function foo() {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Main.hx:7: characters 3-9 : Cannot add module level fields for module Test | ||
Test.hx:1: character 1 : Previously defined here | ||
Main.hx:9: characters 16-27 : Cannot add module level fields for module Test | ||
Test.hx:3: character 1 : Previously defined here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-main Main2 |