groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniil Ovchinnikov (JIRA)" <>
Subject [jira] [Created] (GROOVY-8263) Import alias introduces weird property
Date Tue, 18 Jul 2017 17:36:00 GMT
Daniil Ovchinnikov created GROOVY-8263:

             Summary: Import alias introduces weird property
                 Key: GROOVY-8263
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 2.4.12
            Reporter: Daniil Ovchinnikov

public class Bar {
    public static Object getSome() {return 42;}

import static as getAbc
println abc // 42
println getAbc
println getGetAbc()

AFAIU an alias introduces property into a file which is being compiled (in this case {{getAbc}}
and {{getGetAbc()}}). This works as expected.
But {{abc}} should fail with MPE, instead it's actually resolved into a {{getSome()}}.

Is it a bug or a feature?

This message was sent by Atlassian JIRA

View raw message